Expanding BTRFS Pool

Apr 10, 2025 -- 1 min read

To create the BTRFS pool:

Terminal window
sudo mkfs.btrfs /dev/nvme --label mofp0
sudo mkdir -p /mnt/mofp0
sudo mount LABEL=mofp0 /mnt/mofp0

Then modify /etc/fstab to mount the pool on boot:

Terminal window
LABEL=mofp0 /mnt/mofp0 btrfs defaults 0 0

To add a new device to the existing BTRFS pool:

Terminal window
sudo btrfs filesystem show
Label: 'drive0_wd_2tb' uuid: 4451c98c-4577-43ab-b4c2-59832905d010
Total devices 2 FS bytes used 2.37TiB
devid 1 size 1.82TiB used 1.21TiB path /dev/nvme2n1
devid 2 size 1.82TiB used 1.21TiB path /dev/nvme1n1
Terminal window
sudo btrfs device add /dev/nvme /mnt/mofp0
sudo btrfs balance start /mnt/mofp0 --bg # run in the background
WARNING:
Full balance without filters requested. This operation is very
intense and takes potentially very long. It is recommended to
use the balance filters to narrow down the scope of balance.
Use 'btrfs balance start --full-balance' option to skip this
warning. The operation will start in 10 seconds.
Use Ctrl-C to stop it.
10 9 8 7 6 5 4 3 2 1
Starting balance without any filters.
Terminal window
sudo btrfs device stats /mnt/mofp0