Move your Docker Data Directory from SD to USB-SSD on PINE64
Create an new Directory on the SSD. Follow the Instructions.
mkdir -p /mnt/yourNameofmountedSSD/docker
sudo systemctl stop docker
sudo systemctl stop docker.socket
sudo systemctl stop containerd
nano /lib/systemd/system/docker.service
In this file change the following Code and quit with STRG + O and STRG + X:
Attention! This next step will be overwritten on every docker update! Anotother way is to set the path in /etc/docker/daemon.json with this script.
{
"data-root": "/mnt/docker-data"
}
But that officiall way will not work on my installation. I must try this following.
# Old
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
# New
ExecStart=/usr/bin/dockerd --data-root /new_drive/ -H fd:// --containerd=/run/containerd/containerd.sock
apt-get install rsync
Move the Data from SD to USB SSD
rsync -aP /var/lib/docker/ /mnt/nameSSD/docker/
Rename the old Directory
mv /var/lib/docker /var/lib/docker.old
sudo systemctl start docker
Important!
reboot
Please Check the Login of your Homeassistant Installation. When itÅ› work, remove your old docker directory from SD Card to make more Space avaible.
rm -rf /var/lib/docker.old
You will see the new avaible Space on Homeassistant > Settings > Storage.
I hope you can use this Instruction on your own Risk! Please make an Backup before use.
Greatings from Germany!