About 6 months ago, maybe 7, I posted a question about mounting a disk volume for use with containers on RancherOS. The only working answer was to create a startup.sh file and have that manually mount any other disk volumes that happen to be on the box.
I have to say that is not a satisfying response. Operating Systems have been able to mount multiple disks without having to write custom startup scripts since the 1980’s. Even DOS could do this
What am I missing? The documentation hints that a cloud-config.yml operator “mounts” exists. I’ve tried several incantations without success. Here’s what I want to do: I want to mount /dev/vbd (that’s right there is no partition) onto /mnt/s on bootup. According to the docs, adding mounts: [[“vdb”,"/mnt/s",“ext4”,“defaults”]] to cloud-config.yml via ros config set is the way to do this. Even with RancherOS 0.5, the device does not get mounted. So I do this:
ros config set mounts ‘[["/dev/vbd","/mnt/s",“ext4”,“defaults”]]’
ros config set mounts ‘[[“vbd”,"/mnt/s",“ext4”,“defaults”]]’
and reboot. /mnt/s doesn’t have the device mounted (/mnt/s exists, it’s empty). The device is not mounted at all anywhere. Mounting it by hand mounts the device.
I’ve tried editing /etc/fstab, but of course that doesn’t work because it just gets replaced on startup. Not sure where else to turn (and avoid writing a script to mount the device).
I feel like I’m really missing something fundamental here. Surely there are other people who would like to mount more than the root volume onto a RancherOS based host for use by containers. How are they accomplishing this?
Thanks for you time, desperately trying to adopt RancherOS…