Qubes 4.2.0 Btrfs & 2nd drive

I have a laptop with 2 drives (one SSD, one SATA). With Qubes 4.1 I used this document to add secondary storage. Secondary storage | Qubes OS I used the 2nd drive for one large VM.

With Qubes 4.2.0 I’m using Btrfs. Any tips on how to add Btrfs secondary storage?

Thanks!

1 Like

This seems to work, but I’m not sure the btrfs settings are optimal.

sudo cryptsetup luksFormat --hash=sha512 --key-size=512 --cipher=aes-xts-plain64 --verify-passphrase /dev/sdb

sudo blkid /dev/sdb
My device UUID is 8673eb1c-6d9c-486a-a330-830836ebf642

add to /etc/crypttab
luks-8673eb1c-6d9c-486a-a330-830836ebf642 UUID=8673eb1c-6d9c-486a-a330-830836ebf642 none

reboot

sudo mkfs.btrfs -m single /dev/mapper/luks-8673eb1c-6d9c-486a-a330-830836ebf642
sudo btrfs device scan /dev/mapper/luks-8673eb1c-6d9c-486a-a330-830836ebf642

sudo mkdir /var/lib/qubes2

nano /etc/fstab
UUID=“eb1fc028-70b7-40b0-ade6-b3e4357a73dc” /var/lib/qubes2 btrfs defaults 0 0

sudo mount -a
systemctl daemon-reload

sudo qvm-pool --add varlibqubes2 file-reflink -o dir_path=/var/lib/qubes2

qvm-create -P varlibqubes2 --label grey --template debian-12 vmname

1 Like