I recently wrote about converting a hardware RAID array to Btrfs. In that article I noted that my operating system was running on a single RAID 0 disk handled by the Dell PERC H310 disk controller. This article outlines how I used the Dell PERC H310 to reconfigure the RAID 0 disk into a RAID 1 setup with the addition of a new disk.
If Btrfs Is Good For Storage, Why Not The OS?
I left hardware RAID for my storage array. The storage array is fundamentally different than the disk running my OS. The storage array has 6 disks for massive capacity, has changed over time, will likely change in the future, and needs flexibility. The OS doesn’t need much space; however, when you install Linux there are few things you have to consider on the disk that aren’t relevant for a simple storage array:
- boot partition – this contains data needed to boot the OS. It’s not advisable (yet) to use btrfs on this partition
- swap partition – this contains overflow space for when your physical memory isn’t enough. Again, btrfs isn’t the best choice.
- root partition – this is everything else (sometimes this is split into several partitions, e.g., /home for user data). For this btrfs is fine.
If I want to survive a disk failure all of these partitions have to survive. I could use brtfs on the root partition, but currently the boot and swap partitions need a non-btrfs file system types. This means if the disk with the boot and swap partitions fails at best I’d have a degraded OS and a full system outage if rebooted. Could I recover? Yes, but it’d be painful and the server would have significant downtime. I’d rather have a no-outage recovery. The is where hardware RAID is great. I can let the controller manage the entire disk and be file system agnostic.