This week I took part in an installation where we got a large amount of HP BL460c G6 blades sent to us. One of the daunting tasks was to configure the RAID. The normal thing I see is people waiting for the BIOS to pop up, press F8 or some other trickery of keystrokes to finally get to the RAID menu and configure it. I’m cool doing this one time. I might even do this two times. But at some point a man has got to define a limit to doing mundane repetitive tasks that are better done by computers.
A good guy I know is a dude named Johnny. He pointed me to this link of the hpacucli. I still don’t know how he found the link. His google-foo is better than mine I suppose.
This program can be installed on a Linux machine and then the RAID can be configured. But you’re telling me: ‘Chicken and Egg problem!’ How do you run a program on the OS to configure the RAID when you need an OS installed on the RAID to run the program? Simple: You netboot the machines with a stateless image so that the OS is in memory and doesn’t require hard drives. Too bad for you that you probably don’t have xCAT. Cause I do, and I use it without reservation. And since I have it, it took me 5 minutes to create a stateless image that booted up on the servers. (I’ll tell you how to do that at the end of this little writeup).
Once the machine booted up I ran the command to get the status:
# hpacucli ctrl slot=0 logicaldrive all show status
Probably nothing happening since I haven’t done anything yet. So I took at a look at the physical drives:
# hpacucli ctrl slot=0 pd all show Smart Array P410i in Slot 0 (Embedded) unassigned physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK) physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK)
So then I just made a RAID1 on those disks:
# hpacucli ctrl slot=0 create type=ld drives=1I:1:1,1I:1:2 raid=1
I rebooted the blade into ESXi4.1 kickstart and all was bliss. But then I got even more gnarley. I didn’t want to log into each blade and run that command. So I used xCAT’s psh to update them all:
# psh vhost004-vhost048 'hpacucli ctrl slot=0 create type=ld drives=1I:1:1,1I:1:2 raid=1'
Boom! Instant RAID. Now check them:
# psh vhost003-vhost048 'hpacucli ctrl slot=0 logicaldrive all show status' vhost003: vhost003: logicaldrive 1 (136.7 GB, RAID 1): OK vhost003: vhost005: vhost005: logicaldrive 1 (136.7 GB, RAID 1): OK vhost005: vhost004: vhost004: logicaldrive 1 (136.7 GB, RAID 1): OK vhost004: ...
I’ve used this technique with IBM blades in the past as well. Now all my blades are installed with ESXi 4.1 and I didn’t have to wait through any nasty BIOS boot up menus. I’ve also automated this in the past by sticking this script in the
xCAT image creation for HP 460c G6
This is fairly easy. First, create or modify the /opt/xcat/share/xcat/netboot/centos/compute.pkglist so that it looks like this:
bash nfs-utils openssl dhclient kernel openssh-server openssh-clients busybox-anaconda wget rsync libgcc.i386 libgcc.x86_64 libstdc++.x86_64 libstdc++.i386
Next, run ‘genimage’. The trick with the HP Blades is to add the ‘bnx2x’ driver. Once you’re done with this, install the hpacucli RPM in the stateless image:
# rpm -Uivh hpacucli-8.60-8.0.noarch.rpm -r /install/netboot/centos5.5/x86_64/compute/rootimg
Once this is done, run:
# packimage -p compute -a x86_64 -o centos5.5
Then a simple:
# nodeset vhost001 netboot=centos5.5-x86_64-compute # rpower vhost001
will install the nodes to this image. That’s it, then you can run the commands above to get the RAID set up.
Bonus points: Then install ESXi 4.1 with xCAT.