Growing a RAID1 mirror (destructively) on an HP Proliant Server using hpacucli

(c) hp.com

Recently, we’ve had to replace a RAID1 mirror consisting of 2 146GB drives with 2 300GB ones. As we were able to move the data elsewhere on the server during the process, this was possible online without rebooting the server and causing unnecessary downtimes. Here’s what we did:

– unmount the device if necessary (we were using it for Oracle raw devices so we had to move stuff within Oracle in order to be able to remove it)

– Identify the logical device (usually /dev/cciss/c0d0 or similar). For this example, we’ll be using /dev/cciss/c0d0 (the first logical drive on the first controller #0) .

– Find the logical drive for the mount point by using hpacucli:

show ctrl=0 ld all

then, for each logical drive <n>, do

show ctrl=0 ld <n> show

Eventually, you’ll find the Linux device in this line:

Disk Name: /dev/cciss/c0d0

– Find out which physical drives make up the logical drive by turning on their leds:

ctrl slot=0 ld 0 modify led=on

Now the blue leds on the drives should be lit. Pull the drives from the storage / box server and wait a minute or two.

hpacucli now should have marked the logical drive as failed:

ctrl slot=0 ld 0 show status
Status: Failed

Now install the new (hopefully larger ;-)) drives and use hpacucli again to verify it’s now seeing the larger drives:

ctrl slot=0 ld 0 show

 

You should now see the larger drives in these lines:

 

Mirror Group 0:
 physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 300 GB, OK)
 Mirror Group 1:
 physicaldrive 2I:1:7 (port 2I:box 1:bay 7, SAS, 300 GB, OK)

Now you can re-enable the mirror, using those larger devices:

ctrl slot=0 ld 0 modify reenable

You’ll have to confirm that data on the LD will be lost, but it’s no biggie as you copied the stuff elsewhere, right? 😉

Finally, grow the logical drive to its new capacity:

ctrl slot=0 ld 5 modify size=286070

(this is for a 300GB SAS drive).

Instruct the Linux kernel to partprobe the new disks (they should come up empty with no partitions on them):

# partprobe

That’s it, you should now be able to access the new, larger logical drive using the old Linux device name at /dev/cciss/c0d0. Create partitions as needed and copy back your data to the new device.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *