We’re using RancherOS on OpenStack and want to use a external attached volume to store the data of a database container.
To make our enviornments self-initializing, we want to have the volume auto-formatted and according to the docs RancherOS supports this exact requirement. However, we can’t get it to work.
of course you’re right, it would be possible to write that functionality manually. However, I was hoping that the “reformat only if not formatted / zero” functionality can be used easily. I bet I can find out how to create the same functionality in bash, too.
For now, I stick to manually formatting the volume each time a new environment is created. It’s probably better to have a conditional format command in the bootup script of a productive system anways.
Setting up a new environment does not have to be an automated task for us right now. So I sticked to manually formatting the two volumes we need. After the next reboot they are mounted automatically.
We have now switched to Ubuntu for our test (had some performance problems and want to make sure it’s not RancherOS). Ubuntu with cloud-init also supports the format-if-needed functionality.
I just tried doing some mkfs.vfat formatting myself in rancherOS while installing, and I couldn’t format my drives as well. So I don’t think you can format at all. RancherOS does not include the tools to format drives? I’m getting a command not found
I believe the docs are wrong, if you want to use autoformat, all the parameters have to be passed in as kernel parameters. At least that is the only way I’ve been able to make it work.