In the circumstance where a customer wants to store data in a directory other than /var/lib
(/var/lib/replicated
, /var/lib/replicated-operator
or /var/lib/docker
), we usually suggest bind mounts when it is an option. Replicate does not currently support the dockerd data-root
option.
For example if you wanted to use the directory /usr/local/docker
as an alternative we could bind mount it to the destination using the following command:
mount --bind /usr/local/docker /var/lib/docker
In order to persist that across reboots we will have to edit the /etc/fstab
file to include the mount.
/usr/local/docker /var/lib/docker none defaults,bind 0 0
Now mount of new configuration without reboot.
mount -a