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.
This is an excerpt of the cloud-init:
#cloud-config mounts: - ["/dev/vdb", "/mnt", "ext4", ""] rancher: state: fstype: ext4 formatzero: true autoformat: - /dev/vdb
When running it manually using cloud-init-execute there is the following output:
mount: mounting /dev/vdb on /mnt failed: Invalid argument > ERRO Failed to mount /mnt: exit status 255
Which is the same output which mnt -t ext4 /dev/vdb /mnt shows. I assume it is because the drive has not been formatted before.
Any idea what could be wrong?