No. Actually, most of the space in the system is always used by /var
where normally variable data lives — databases, Docker, logs, and so on, while Linux's /
, rarely uses more than 10 GiB of space, when the system is properly managed.
Not only your LVM is suboptimal: I'd fit the whole Debian installation with some services into the space you wasted in your ESP and /boot
. (I had a habit of creating VMs with 4GiB allocated for the system. More than enough.)
So well, the best solution would be to reduce your oversized root file system, but that couldn't be done online. You need to boot some rescue media, activate your VG and then reduce the file system and the logical volume and that could consume substantial time, considering the size of the partition. Also it is possible to mess things. If you're in hurry, you can make a twist: make some directory in root, move the Docker data into it and bind-mount it back into where Docker data live in var. You need to stop Docker and all containers for the time being. Something like this:
systemctl stop docker.service
mkdir /var-lib-docker
mv /var/lib/docker/* /var-lib-docker
mount --bind /var-lib-docker /var/lib/docker
systemctl start docker.service
That way, the Docker will use the space on the oversized root file system, while being available at the usual location. In the /etc/fstab
you need to add the following entry, so this configuration will survive reboot:
/var-lib-docker /var/lib/docker none bind 0 0
But remember this is quite ugly hack which can buy you some time but also bring some problems, so look for the opportunity to reclaim space from the root and allocating it to /var
properly.
And let this be the lesson: never allocate all avaliable space from the beginning. Leave some (most) of it unallocated. You can always easily add the space and do that online, while it is very hard, time consuming and error prone to reclaim it, and that requires downtime. It is best to manage the space so you never need to reclaim it.