Hi guys,
I need to move all data (container, volume ecc) of docker in a new raid5 partition.
I have followed this steps that was working fine in other system.
sudo service docker stop
Add a configuration file to tell the docker daemon what is the location of the data directory
creating new file daemon.json under the directory /etc/docker:
{
"data-root": "/path/to/your/docker"
}
sudo rsync -aP /var/lib/docker/ /path/to/your/new/docker
sudo mv /var/lib/docker /var/lib/docker.bkp
signal-event nethserver-docker-update
at this point I should find all the old containers already “ready”, but I can’t find it any of those… only the portainer is present.
And the docker info show me the docker root dir not changed.
# docker info | grep Root
Docker Root Dir: /var/lib/docker
In the documentation there aren’t something that can help… can you suggest what i am missing?
Thanks
Update- One bit more.
Also change the docker.service the data-root doesn’t change.
nano /lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --data-root /fabristorage
signal-event nethserver-docker-update