Why is my LV pool00 smaller than the PV size, missing ~50 GB disk space?

I have a 256 GB (~230 GiB) disk, but I found there’s only about 177 GiB of disk space is actually usable after a Qubes installation.

[niconiconi@dom0 ~]$ sudo pvs
  PV                                                    VG         Fmt  Attr PSize   PFree 
  /dev/mapper/luks-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx qubes_dom0 lvm2 a--  231.39g 46.28g

[niconiconi@dom0 ~]$ sudo vgs
  VG         #PV #LV #SN Attr   VSize   VFree 
  qubes_dom0   1  89   0 wz--n- 231.39g 46.28g

[niconiconi@dom0 ~]$ sudo lvs
  LV                                          VG         Attr       LSize   Pool   Origin                                      Data%  Meta%  Move Log Cpy%Sync Convert
  pool00                                      qubes_dom0 twi-aotz-- 177.06g                                                    74.12  52.19                           
  root                                        qubes_dom0 Vwi-aotz-- 177.06g pool00                                             9.25                                   
  swap                                        qubes_dom0 -wi-ao----   7.69g                                                                                           
  [...]

Where does the ~50 GB disk space go? Is it used internally by Qubes, if so, how? I tried to search for a technical explanation but couldn’t any information. The closest thing I got was a GItHub Issue, asking the same question

Do you know why the size of the pool is less than the size of the available space on the drive? The test drive I installed QubesOS 4.0 (default install, no custom storage settings) on is 118 GB, qubes_dom0-swap is 7.6 GB, but the pool is only 94GB - are ~15 GBs missing?

A user speculates that…

I think the 15-16GB free might be space left to allow resizing the metadata LV for the thin pool, which is limited to 16GB size (just a guess though). […] I think the installer just creates a swap partition with size half of the current RAM

Yes, I do have a large swap, but it still can’t explain the rest 40 GiB of missing space. Does LVM needs that much metadata for thin provisioning? Could anyone give me links to some documentation on how the storage works under the hood in QubesOS?

Isn’t it related to this?

1 Like

Ah, thank you!

This problem was driving me crazy and the lack of space has crashed my system many times already, requiring manual recovery. It turned out to be a simple bug. Who could’ve thought about that…

1 Like