BTRFS RAID1 to Single

RAID1 to single disk balance behavior

When using:

$btrfs balance -dconvert=single -f /mydir

The way btrfs behaves is by allocating the data to the largest disk in the array. This can be an annoying behavior if you want to keep the small disk, say if your large disk is failing. I was also confused by the devid= filter, but that doesn’t say where the block groups will go when balanced, but only which block groups are chosen for balance.

  1. Resize the disk you don’t want to smaller than the one you do want with btrfs fs resize
  2. Do a single conversion with btrfs balance -dconvert=single -mconvert=single -f /mountpoint
  3. Check that it was actually in single by doing btrfs de usage /mountpoint
  4. Remove disk no longer wanted with btrfs de delete /dev/sd@ /mountpoint
  5. Duplicate metadata for redundancy with btrfs bal -mconvert=dup /mountpoint

Leave a Reply