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.

Physical Drive Setup

The goal is to have two mirrored disks for the OS, and leave the remaining disks for storage.

Drives, Current State

  • Bay 0: Western Digital RE 1 TB (WD1003FBYZ) - RAID 0 (this is the OS disk)
  • Bay 1: Old Seagate 1 TB, not used, will discard
  • Bay 2-7: 12TB RAID 6 array using Btrfs. No changes. (Details in previous article.)

Drives, To-Be State

  • Bay 0-1: Western Digital RE 1 TB (WD1003FBYZ) – 2 HDDs - RAID 1 (Mirror)
  • Bay 2-7: 12TB RAID 6 array using Btrfs. No changes. (Details in previous article.)

The Approach

The Dell PERC H310 allows for some RAID reconfigurations on the fly. Lucky for me, RAID 0 with 1 disk to RAID 1 with 2 disks is supported. So I have two steps to complete.

  1. Add New Disk: Put a new 1 TB HDD in bay 1.
  2. Reconfigure RAID 0 to RAID 1: Let the Dell PERC H310 reconfigure the disks on the fly.

Add New Disk

Adding the new disk is quite simple. I boot in the PERC H310 BIOS Configuration tool, remove the old drive and prepare to insert the new one.

A quick look at the screen shows disk 1 to be missing. As soon as we insert the drive, it appears as Non-RAID. As we want this disk to be a member of a RAID 1 array, we need to change this. Pressing F2 brings up the operations menu and we can select “Convert to RAID Capable.” As expected, the drive now shows “Ready,” which means it’s ready for use as a RAID disk.

Disk ID 00:01:01 is missing.

With new disk, Disk ID 00:01:01 present as Non-RAID.

Convert Disk ID 00:01:01 to RAID Capable.

Disk ID 00:01:01 "Ready" or RAID Capable.

Reconfigure RAID 0 to RAID 1

This step is simple, but somewhat hidden away. I first looked for the reconfigure option in the BIOS tool. It’s not there. Ok, so it’s probably on the iDRAC web interface, right? Nope. The only way to do the conversion is to reboot, press F10 and go into the Lifecycle Controller. Navigate: System Setup > Advanced Hardware Configuration > Device Settings > RAID Controller > Virtual Disk Management.

From there, we can select our virtual disk, choose our new RAID level of 1, and then add physical disks. In this case there’s only one to choose, so we check the box by disk 1.

Lifecycle Controller: Reconfigure virtual disks.

Lifecycle Controller: Add physical disks.

Lifecycle Controller: Select disk to add.

Last, we’re asked to confirm and start the operation. At this point you’re returned to the menu, but oddly there’s nothing to tell you the process started. If you log into the iDRAC web interface, you can navigate to Storage and see that the activity has started. (Likewise, the Lifecycle log has information too.)

Lifecycle Controller: Confirm add disk.

Lifecycle Controller: Start operation.

iDRAC Web Interface: Operation-in-progress indicator.

Unfortunately, there is no percentage completion status. The only way you can get details is to reboot, open the PERC H310 BIOS utility, select the virtual disk and look at the details. Not super useful if you don’t want downtime, but at least this confirms the process has truly started.

PERC H310 BIOS: Detailed progress indicator.

Roughly 23 hours later, the reconfiguration is complete! Now if we look at the physical disks on VD0, we see the new disk.

iDRAC Web Interface: Operation complete.

iDRAC Web Interface: Virtual disks shows two physical disks.

And that’s it. Our system functions exactly as before, but now with tolerance for an OS disk failure.