How to remount/migrate /var/lib/docker to a bigger disk


1. Stop Services

Stop the following services:

💡 You may want to mask these services to prevent them from restarting automatically.


2. Copy Docker Data Directory

Copy the entire Docker data directory:

/var/lib/docker

to a temporary location.


3. Unmount Current Mount

Unmount the current mount point:

/var/lib/docker


4. Update /etc/fstab

Add or update the entry for the new disk or path. Example:

/dev/<PATH> /var/lib/docker xfs rw,auto,pquota 0 0


5. Remount

Mount the new filesystem:

/var/lib/docker


6. Restart Services

Start the services again:


7. Update Machine Info

Run the following command:

sudo python3 /var/lib/vastai_kaalia/send_mach_info.py

This will refresh the machine information after the migration.

Updated on: 18/03/2026