Rancher 2: Kubernetes cluster provisioning fails with error response / is not a shared mount

Written by - 0 comments

Published on April 24th 2020 - Listed in Rancher Kubernetes Containers


On dev environments sometimes a simple LXC or VM is powered on with a single partition: Everything is running in the root partition. This is not a wise choice on production systems, but on fire-and-forget machines this is a common practice. 

However when deploying a Kubernetes cluster (using Rancher 2), this seems to cause problems. 

The error message shows:

Error response from daemon: path /var/lib/rancher is mounted on / but it is not a shared mount]

To overcome this error message, the root partition needs to be mounted using the --make-rshared parameter. This does not remount the partition itself and can be done during runtime:

root@kube3:~# mount --make-rshared /

To overcome a reboot, the command can be added in /etc/rc.local:

root@kube3:~# cat < /etc/rc.local
#!/bin/bash
mount --make-shared /
exit
EOF


root@kube3:~# chmod 755 /etc/rc.local

The cluster provisioning should be able to continue after this adjustment.


Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.