5

How would I convert an existing BTRFs pool, within Debian Jessie (4.2 Kernel) that I created with...

sudo mkfs.btrfs /dev/sdb /dev/sdc /dev/sdd

...into being fully redundant, or as redundant as it can be with a 250, 500 and 500GB HDDs.

Note, this is NOT for anything serious/production, I'm just learning about BTRFS on a temp machine. I do intend to build a new machine with a good deal more 4TB+ drives.

I want everything to be redundant, data, metadata etc....

1 Answer 1

3

For creating a RAID1 array, simply use:

mkfs.btrfs -m raid1 -d raid1 /dev/sdb /dev/sdc /dev/sdd

For aggregating existing btrfs volumes into a RAID1 array:

mount /dev/sdb /MountPoint
btrfs device add /dev/sdc /MountPoint
btrfs device add /dev/sdd /MountPoint
btrfs balance start -dconvert=raid1 -mconvert=raid1 -sconvert=raid1 --force /MountPoint

Metadata (-m), data (-d), and system blocks (-s) will be in RAID1 mode.

Doc:

6
  • Is there a 'as redundant as storage space allows' option? Oct 12, 2015 at 10:43
  • Not sure what you mean with this; btrfs uses all the possible space. See btrfs.wiki.kernel.org/index.php/SysadminGuide for details on RAID1 Oct 12, 2015 at 10:51
  • Sorry, wasn't focusing whilst writing. I've already got a BTRFs pool, which auto mounts via fstab. How do I adjust it to get raid. Your solution seems to be for adding stand alone btrfs devices to existing pool. But all my the drives are already part of the pool. Oct 12, 2015 at 11:01
  • You need to change the mode of the pool and to balance the contents; see btrfs.wiki.kernel.org/index.php/… Oct 12, 2015 at 11:50
  • 1
    On the btrfs balance, you also want "sconvert" to make the system blocks mirrored. "btrfs balance start -dconvert=raid1 -mconvert=raid1 -sconvert=raid1 --force /MountPoint"
    – Grunthos
    Oct 15, 2015 at 0:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .