I am trying btrfs with Qubes OS R4.2 but I think that the questions here are not related to qubes release.
First question. I tried to enable compression for btrfs partition by editing /etc/fstab
and append ,compress=zstd
to the mount options for the btrfs but I have not rebooted the machine yet. I wonder whether this is suggested method or are there any pitfalls here?
Second question. I want to know the best practice to defragment template vm root.
In btrfs setup of Qubes OS, the root images and private images are merely sparse files in the btrfs partition.
And for each template VM, its root image seems to be cp --reflink
ed into every appvm using the template.
According to btrfs documentation Defragmentation â BTRFS documentation , reflink will be broken on defragmentation. Also defragmentation with btrfs without defragmentation of inner ext4 file system seems unwise.
I am think about a procedure to defragment one template vm root filesystem
(1) power off every vm other than dom0
(2) set the template vm of every appvm so that no vm point to the template
(3) using some method to generate the defragmented version of its rootfs
(4) btrfs filesystem defrag -czstd filename
(5) then reset the template vm of those appvm to the template vm
is this viable? are there any suggestions on better methods?
Third question. What are suggestions about deduplication in Qubes OS? I see no default deduplication applications in dom0 installed by default.
Fourth question. What are suggestions for VM with large volumes, most of which are docker containers?