Is there a way to move Docker volumes to a USB stick on a ThinClient with limited storage?

Hello, I have Ubuntu 20.20 LTS installed on a ThinClient with limited storage space, and I’ve installed Docker underneath. Unfortunately, my storage is full, and I wanted to move everything to a USB stick that is permanently connected to the ThinClient. Unfortunately, I couldn’t change the storage location /var/lib/docker/volumes/... using “rsync -aPL /source/path/ /destination/path” or “mv /var/lib/docker/volumes/ to /destination/path”. Is there a way for me to somehow move my volumes to the USB stick and have them continue running there? Currently, Portainer and Heimdall are running, and I also wanted to install Home Assistant (unfortunately, there’s not enough storage). My USB stick got like 32 GB.

root@…:/# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 28.7G 0 disk
└─sda1 8:1 1 28.7G 0 part
mmcblk0 179:0 0 7.3G 0 disk
├─mmcblk0p1 179:1 0 538M 0 part /boot/efi
├─mmcblk0p2 179:2 0 1.8G 0 part /boot
└─mmcblk0p3 179:3 0 5G 0 part
└─ubuntu–vg-ubuntu–lv 253:0 0 5G 0 lvm /
mmcblk0boot0 179:8 0 4M 1 disk
mmcblk0boot1 179:16 0 4M 1 disk

You can try this, but no guarantees:

  1. Stop Docker daemon
  2. Edit /etc/docker/daemon.json, add data-root (doc)
  3. Optional: copy existing /var/lib/docker to new folder
  4. Start Docker daemon

Note that a USB stick is usually not made for heavy continuous usage, it will probably wear out. You might want to use an external harddrive or SSD/NVMe instead.

ah. Alright, thx. I try it.