Additional mounts not working


#1

I am trying to get additional mounts working. I am using 1.1.1

ros os version
v1.1.1

I set extra mounts using

ros config set mounts '[["/dev/vdb","/opt/default","ext4"],["/dev/vdc","/opt/fast","ext4"]]'

And it looks like this

ros config get mounts
- - /dev/vdb
  - /opt/default
  - ext4
- - /dev/vdc
  - /opt/fast
  - ext4

When i do not format the disks prior reboot, it reboots but nothing is mounted. If i format the disks using

mkfs.ext4 /dev/vdb
mkfs.ext4 /dev/vdc

I can mount them properly using

mount /dev/vdb /opt/default
mount /dev/vdc /opt/fast

The boot stucks at

[   17.266437] docker-sys: port 1(vethfafdb7be) entered blocking state
[   17.267653] docker-sys: port 1(vethfafdb7be) entered forwarding state
[            ] ros-sysinit:info: [18/18] [preload-user-images]: Started
[            ] ros-sysinit:info: [3/4] Starting sync
[            ] ros-sysinit:info: Project [os]: Project started
[            ] ros-sysinit:info: [4/4] Starting banner
[            ] ros-sysinit:info: RancherOS v1.1.1 started

Interestingly not even the ttyS0 autologin console does work in this case. It does work if recovery console is selected in grub and it does work if the system actually boots, the autologin works on ttS0.

That said, i cannot really retrieve any logs for further analysis and i cannot really see the docs http://rancher.com/docs/os/v1.1/en/storage/additional-mounts/ being of any help.

So concrete questions are

  1. Do i need / have to format the disk being mounted prior defining the mounts in rancher ( to have them working )?
  2. If yes, why does the system stalls on boot?
  3. (thats kind of a offtopic here, but interesting for analysis for the actual problem): Why is autologin not working at all, does the consol not start up ( ssh is not working either, but that is what i expected ).

#2

One needs to preformat the disks and also ensure the 4th paramter is set, see this PR: https://github.com/rancher/rancher.github.io/pull/951


#3

Maybe for the reference, if you want to actually mount /var/lib/docker you need to change the location first

mounts:
  - ["/dev/vdb", "/mnt/docker", "ext4", ""]
rancher:
  docker:
    graph: /mnt/docker

so we move the location to /mnt/docker and then mount this. Mounting on /var/lib/docker will not work, e.g. that one will fail

mounts:
  - ["/dev/vdb", "/var/lib/docker", "ext4", ""]

#4

What can I do if I already do this wrongly? I’m stuck when then os start

[ ] ros-sysinit:info: RancherOS v1.1.3 started

and no any further outputs.

I logged in to the recovery mode, but I can’t find how to correct the config, the wrong “mounts” config didn’t showed in ros config export command.


#5

and there is no file at /var/lib/rancher/conf/cloud-config.yml in recovery mode