Shrink the default installed LVM partition or allocate an attachable block device with no snapshot?

Qubes OS uses LVM to manage root partitions and private partitions for various appVMs. Each time appVM starts, the root and private block device the appVM uses will be a snapshot of the original volume. Each time appVM shutdowns, the snapshot for the root partition will be discarded and that for private one will be flushed to the original private volume. When there is a great amount of data to be written, the process will be inefficient.

An idea is to create a partition whose space is continuous on disk and preallocated that can be mounted onto appVM. Such partition does not have snapshot functionality. This partition can be formated by appVM as ext4, btrfs, zfs, etc.

Any suggestions on how to do this inside LVM or outside LVM (to shrink the preinstalled LVM PV install? pvresize does not work and so does pvshrink, as vm-pool_data size is extended into its maximum and cannot be changed)

1 Like

Hi,
I’ve solved it using dom0 features for loop sharing file, but it’s not really appreciated by community for its potential security holes.
You can find something there: https://groups.google.com/g/qubes-devel/c/5hl_IrSyFO4
Cheers,
M.