Archive for the 'RAID' Category

Faster software RAID reconstruction

Sunday, July 23rd, 2006

When creating or reconstructing a Linux software RAID there is a default reconstruction rate at which the RAID will be created. On RHEL the default max speed at which it will reconstruct the array is 10000 KB/sec. This setting can easily be adjusted for the impatient among us.

echo -n 500000 > /proc/sys/dev/raid/speed_limit_max

The above command will set the max reconstruction speed to 500000 KB/sec (which will essentially max out at the speed of your drives, usually in the 50MB/sec zone from my experience).

Bumping the value up will tax the disk subsystem more than the default but often it’s worth it to get that warm fuzzy of having a consistent RAID.

Remote Conversion to RAID-1 for Crazy Sysadmins

Thursday, February 16th, 2006

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:
http://togami.com/~warren/guides/remoteraidcrazies/

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.