[qubes-users] Disk space not being returned back to the pool

Hi,

I’m struggling with a disk space issue on my laptop, running Qubes 4.0 (up to date). I reached ~95% of the disk usage threshold, and no matter what I do I can’t get it back to the pool.

Most of the disk space was allocated to a single VM (used to browse, download stuff etc.) so I deleted planty of data, and then did “fstrim -a -v” in the VM, expecting the disk space to be returned to the pool after a while. But that didn’t happen - the disk usage is still reported as ~90%, but AFAIK it should be ~30%.

After a while (~24H) I even tried to delete the whole VM, but that didn’t make any difference either.

So I wonder what to do - is there something wrong with the thin provisioning and the disk space is lost forever, or what? Any ideas?

Tomas

1 Like

FWIW I managed to solve this by booting from a Fedora USB, and running “lvconvert --repair” on the pool. So roughly this:

  1. boot into Fedora Workstation USB (or any other Live USB you want

  2. open the LUKS device

cryptsetup luksOpen /dev/… crypted

  1. run lvscan to detect all the LVM volumes etc.

lvscan
lvs

  1. deactivate everything in /dev/qubes_dom0:

cd /dev/qubes_dom0

for f in *; do lvchange -an qubes_dom0/$f; done

  1. repair the pool

lvconvert --repair qubes_dom0/pool00

  1. reboot into Qubes

Not sure why/how it got broken, but this returned all the missing space to the pool and everything seems to be working fine.

1 Like