Building a RAID post-mkfs?
Hi,
I installed btrfs to one disk using the Fedora 12 installer; it doesn't allow any configuration of the mkfs command by the user, so it wasn't possible to mkfs with more than one disk.
I'd like to add a second disk, with either RAID0 or RAID1 between the two -- the equivalent of "mkfs.btrfs -m raid0/1 -d raid0/1 /dev/sda /dev/sdb". Is it possible to create this non-destructively now? If not, should it be? What would the implementation look like?
Thanks,
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> One Laptop Per Child
Quoted 10 lines · Chris Ball
Hi,
I installed btrfs to one disk using the Fedora 12 installer; it doesn't allow any configuration of the mkfs command by the user, so it wasn't possible to mkfs with more than one disk.
I'd like to add a second disk, with either RAID0 or RAID1 between the two -- the equivalent of "mkfs.btrfs -m raid0/1 -d raid0/1
/dev/sda/dev/sdb". Is it possible to create this non-destructively now? If not, should it be? What would the implementation look like?
It's not very complex, you can take a look at how we upgrade from single spindle dup to RAID1 for metadata when a second disk is added. Basically once we have a block group with the new type we're able to force new allocations to the new raid level. btrfs-vol -b does the rest.
-chris