Remote Conversion to RAID-1 for Crazy Sysadmins

February 16th, 2006 | Tags:

One of my clients purchased a dedicated server with 2 hard drives (very common configuration these days). Unfortunately their provider can’t/won’t configure their server to use software raid. My suggestion was to use the 2 matching drives in a software raid-1 configuration, but I’ve never remotely setup software raid after a server was already up and running.

Warren Togami provides a very detailed howto on remotely migrating 2 matching hard drives running Linux to a software RAID-1 configuration:

This server was running RHEL4 and the above process worked great for me. I do have some notes that I’ll be sending back to Warren:

  • Step 5) My first drive was setup to use 255 heads whereas hdc was configured to use 16. I ran “sfdisk -H 255 /dev/hdc < partitions.txt" instead of "sfdisk /dev/hdc < partitions.txt" to reconfigure the 2nd disk to use 255 heads just like hda.
  • Step 25) Shouldn’t the commands for hdc be referencing (hd1) and (hd1,0) (where appropriate)?
  • Step 26) It says to most importantly change the root setting back to (hd0,0), yet the example still shows (hd1,0).
  • Step 27) Attempting to run “mdadm -A -s” resulted in a “mdadm: No arrays found in config file” error message. I was able to get rid of this error by creating /etc/mdadm.conf as listed in Step 22 (even though it says RHEL4 no longer requires that file, it seemed to help out in my situation).

Without Warren’s document it would have taken me much longer to figure out the best way to get this done remotely. I’m usually spoiled in that I have hardware raid on most machines and get to partition things just as I wish when I install them on-site.

Comments are closed.