Simple commands to setup a BTRFS filesystem across multiple disks as a JBOD implementation.
# Create a filesystem across the drives (metadata mirrored, linear data allocation)
sudo mkfs.btrfs -f -L MEDIA -d single -m raid1 /dev/mapper/data-*To show all the filesystems
sudo btrfs filesystem showTo check filesystem usage
sudo btrfs filesystem df /mnt/mediaIn order to then add a disk to this filesystem later
sudo btrfs device add /dev/sdb /mnt/media
btrfs filesystem balance /mnt/mediaWe can also convert another btrfs filesystem data allocation (e.g. RAID1) to single as part of the balance process.
sudo btrfs balance start -dconvert=single,soft /mnt/media
As far as I’m aware. Alternatively a better approach is probably to use MergerFS to combine the disks and then, optionally, use SnapRAID. Depends on the type of media being stored but that’s the approach I’ve got for:
• LUKS encrypt each disk individually
• Mount at boot time
• MergerFS combines into a virtual filesystem