Stop docker: systemctl docker stop.
Verify no docker process is running ps faux
Double check docker really isn’t running.
- Take a look at the current docker directory: ls /var/lib/docker/
- Make a backup – tar -zcC /var/lib docker > /mnt/pd0/var_lib_docker-backup-$(date +%s).tar.gz
- Move the /var/lib/docker directory to your new partition: mv /var/lib/docker /mnt/pd0/docker
- Make a symlink: ln -s /mnt/pd0/docker /var/lib/docker
- Take a peek at the directory structure to make sure it looks like it did before the mv: ls /var/lib/docker/ (note the trailing slash to resolve the symlink)
- Start docker back up: systemctl start docker
- restart your containers