无法在RancherOS上配置OpenEBS卷

问题描述 投票:0回答:1

我使用Rancher v2作为k8s管理平台并在VMware vSphere上运行RancherOS节点。我手动安装了开放式iSCSI,并在工作节点上安装了50GB卷供OpenEBS使用(必须弄清楚如何在创建节点时自动执行)。我还创建了一个cStor存储类,一切看起来都不错。但是,我无法使用pvc获得容器来配置pv。

Warning    FailedMount    Unable to mount volumes for pod "web-test-54d9845456-bc8fc_infra-test(10f856c1-6882-11e9-87a2-0050568eb63d)": timeout expired waiting for volumes to attach or mount for pod "infra-test"/"web-test-54d9845456-bc8fc". list of unmounted volumes=[cstor-vol-01]. list of unattached volumes=[web-test-kube-pvc vol1 man-volmnt-01 cstor-vol-01 default-token-lxffz]
Warning    FailedMount    MountVolume.WaitForAttach failed for volume "pvc-b59c9b5d-6857-11e9-87a2-0050568eb63d" : failed to get any path for iscsi disk, last err seen: iscsi: failed to sendtargets to portal 10.43.48.95:3260 output: iscsiadm: Could not open /run/lock/iscsi: No such file or directory iscsiadm: Could not open /run/lock/iscsi: No such file or directory iscsiadm: Could not open /run/lock/iscsi: No such file or directory iscsiadm: Could not add new discovery record. , err exit status

我已经按照以下步骤从OpenEBS文档中为RancherOS的Prerquisitie部分启用RancherOS上的iSCSI。

sudo ros s up open-iscsi
sudo ros config set rancher.services.user-volumes.volumes [/home:/home,/opt:/opt,/var/lib/kubelet:/var/lib/kubelet,/etc/kubernetes:/etc/kubernetes,/var/openebs]
sudo system-docker rm all-volumes
sudo reboot
openebs rancheros
1个回答
0
投票

从Rancher OS的github存储库中,发现我们需要创建一个锁目录,并确保每次启动都使用以下方式创建此目录

$ mkdir /run/lock
# update cloud-config
#cloud-config
runcmd:
- [mkdir, /run/lock]

参考路径:牧场主的github回购。然后在rancher / OS下找到第2435号问题

© www.soinside.com 2019 - 2024. All rights reserved.