How to add a BTRFS RAID1 storage pool

I want to add a btrfs RAID1 storage pool to my Incus server.

Do I have to add one disk first during “incus admin init” , so creating a default btrfs storage pool by incus? And then add the second disk to btrfs myself to create the RAID1.

Or do I have to create a btrfs RAID1 configuration first and add it afterwards using “incus storage create pool1 btrfs source=/dev/mapper/sda3_crypt” ?

Either should be fine. I think I’d probably go with having Incus create the pool and then add the second disk to it. Incus tracks the pool by UUID, so it being reconfigured to having multiple disks won’t affect it.

Your suggested method works fine. Thank you.

$ sudo btrfs device add /dev/mapper/sdb4_crypt /var/lib/incus/storage-pools/default

$ sudo btrfs balance start -dconvert=raid1 -mconvert=raid1 /var/lib/incus/storage-pools/default

$ sudo btrfs fi sh

Label: ‘default’ uuid: 449cc0ae-c64c-495c-8386-bdf6895022c1
Total devices 2 FS bytes used 144.00KiB
devid 1 size 2.63TiB used 3.03GiB path /dev/mapper/sda4_crypt
devid 2 size 2.63TiB used 3.03GiB path /dev/mapper/sdb4_crypt

$ sudo incus storage set default btrfs.mount_options “noatime,user_subvol_rm_allowed,compress=zstd:3”