Hacks to make a storage pool out of a block device?

Is it possible to make a storage pool out of a block, img, or loop device?

http://qubesosfasa4zl44o4tws22di6kepyzfeqv3tg4e3ztknltfxqrymdad.onion/doc/secondary-storage/

If you’re having trouble running the pvcreate command from the secondary storage documentation with a loop device as the argument, it’s because by default LVM is forbidden to interact with loop devices. See the commit message in this (still open) pull request for context and a workaround:

One alternative to that would be to create a reflink-capable filesystem (currently Btrfs or XFS) on the loop device, mount it, and create a file-reflink storage pool inside the mountpoint.

1 Like

I have found that if I give a qube access to two disk slices I can create a zpool and whatever zvol I create show up in the list of available block devices to attach to another qube. ZFS may not be for everyone. I do have what some might call a “powerful” system here, but nothing too special. I have come to see Qubes’ storage pool based on LVM as “systems” and the zpool on two other physically separate disks as “user data”. I have not yet run benchmarks. Performance seems fine but I am not doing anything demanding.

I do look forward to when Qubes has full ZFS integration.