Thanks! That would be great
I use RancherOS 1.4.2 rancheros-vmware.iso
successfully mount directory form my nfs server.
RancherOS mount
command is build from busybox, not the GNU mount
command, so there maybe some different.RancherOS has no mount.nfs
& mount.nfs4
which installed by nfs-common
by default, so without mount.nfs...
user need to add options.
#cloud-config
mounts:
- ["192.168.1.109:/mnt/data", "/mnt/test", "nfs4", "nolock,proto=tcp,addr=192.168.1.109"]
output:
[root@rancheros-nfs docker]# ls /mnt/test
1.txt
I tested this on 1.4.2 it worked flawlessly, on 1.5 it does not
I also try on 1.5.0-rc1
rancheros.iso, the result is success, maybe needs more testing.
[root@rancher rancher]# ros -v
version v1.5.0-rc1 from os image rancher/os:v1.5.0-rc1
[root@rancher rancher]# ros c export
mounts:
- - 192.168.1.79:/mnt/data
- /mnt/test
- nfs4
- ""
rancher:
environment:
EXTRA_CMDLINE: /init
services_include:
open-vm-tools: true
state:
dev: LABEL=RANCHER_STATE
wait: true
ssh_authorized_keys: []
[root@rancher rancher]# df -h
Filesystem Size Used Available Use% Mounted on
overlay 7.4G 773.4M 6.3G 11% /
tmpfs 930.9M 0 930.9M 0% /dev
tmpfs 986.4M 0 986.4M 0% /sys/fs/cgroup
/dev/sda1 7.4G 773.4M 6.3G 11% /opt
/dev/sda1 7.4G 773.4M 6.3G 11% /mnt
/dev/sda1 7.4G 773.4M 6.3G 11% /home
none 986.4M 876.0K 985.5M 0% /run
/dev/sda1 7.4G 773.4M 6.3G 11% /media
/dev/sda1 7.4G 773.4M 6.3G 11% /etc/resolv.conf
/dev/sda1 7.4G 773.4M 6.3G 11% /etc/selinux
/dev/sda1 7.4G 773.4M 6.3G 11% /usr/lib/firmware
none 986.4M 876.0K 985.5M 0% /var/run
/dev/sda1 7.4G 773.4M 6.3G 11% /etc/logrotate.d
/dev/sda1 7.4G 773.4M 6.3G 11% /usr/lib/modules
/dev/sda1 7.4G 773.4M 6.3G 11% /var/log
/dev/sda1 7.4G 773.4M 6.3G 11% /usr/sbin/iptables
/dev/sda1 7.4G 773.4M 6.3G 11% /etc/docker
/dev/sda1 7.4G 773.4M 6.3G 11% /etc/hosts
devtmpfs 930.9M 0 930.9M 0% /host/dev
shm 64.0M 0 64.0M 0% /host/dev/shm
/dev/sda1 7.4G 773.4M 6.3G 11% /etc/hostname
shm 64.0M 0 64.0M 0% /dev/shm
/dev/sda1 7.4G 773.4M 6.3G 11% /usr/bin/ros
/dev/sda1 7.4G 773.4M 6.3G 11% /var/lib/kubelet
/dev/sda1 7.4G 773.4M 6.3G 11% /var/lib/docker
/dev/sda1 7.4G 773.4M 6.3G 11% /var/lib/boot2docker
/dev/sda1 7.4G 773.4M 6.3G 11% /var/lib/rancher
/dev/sda1 7.4G 773.4M 6.3G 11% /usr/share/ros
/dev/sda1 7.4G 773.4M 6.3G 11% /usr/bin/system-docker-runc
/dev/sda1 7.4G 773.4M 6.3G 11% /usr/bin/system-docker
/dev/sda1 7.4G 773.4M 6.3G 11% /var/lib/m-user-docker
/dev/sda1 7.4G 773.4M 6.3G 11% /etc/ssl/certs/ca-certificates.crt.rancher
/dev/sda1 7.4G 773.4M 6.3G 11% /var/lib/rancher/conf
/dev/sda1 7.4G 773.4M 6.3G 11% /var/lib/rancher/cache
devtmpfs 930.9M 0 930.9M 0% /dev
shm 64.0M 0 64.0M 0% /dev/shm
192.168.1.79:/mnt/data
18.6G 1.5G 16.1G 9% /mnt/test
mhh not really sure what to try next.
Found this: https://github.com/rancher/os/issues/2606 …makes sense?
Okay, but how do I define a mount using the disk’s uuid?