Saturday, July 21, 2012

BTRFS mirroring on root

If you have set up your system with btrfs mirroring for the root drive (ie by booting into the rescue environment on the installer, making the FS, then booting the installer, telling it to use one of the btrfs partitions as btrfs but not format... then when done doing a grub-install onto the other drives)...

If you lose a drive (on purpose or otherwise)...

When you reboot the first time if you have not replaced the drive you need to edit the kernel command line so that it says "rootflags=degraded,subvolid=@", not "rootflags=subvolid=@,degraded"...

Also, if you're testing by yanking the sata cables, re-adding, rebalanceing, removing the failed drive-id, etc over and over without rebooting, it will get to a point where all the data lives on only one drive without a mirror. If you reboot and rebalance again and remove any missing drive it should fix it.

No comments:

Post a Comment