VMware ESXi – expand RAID and resize VMFS datastore – also on non-HP server hardware

Recently, I extended my RAID 5 array with 2 extra disks from 3x 146GB to 5x 146GB, creating thus a logical RAID 5 volume of (5x 146 – 146=) 584GB. Since I didn’t want to move my VM’s to another box and reformat the datastore, I gathered all the info on the internet and made this manual.

Notes:

    * All the instructions are executed on a whitebox (i7 3770) and a SmartArray P400 controller.
    * I already modified the HP ESXi tools to be able to run on non-HP hardware.
    * It is highly recommended that you backup all your VM’s before executing a single command.
    Everything worked fine for me but one error in a command could lead to a complete data loss of everything!
    * To see the rebuilding status, HP has a tool called hpacucli which allows you to control the array and see the status of it out of the ESXi console.
    * I’m NOT responsible for YOUR mistakes. See note 3.

This is my old situation:

The steps:

– Add disks to your RAID array using ACU (offline boot CD)
hpacuoffline-9.10-22.0.iso

Explaining how to add disks is beyond the scope of this guide.

If you’re using non-HP server, get these modified HP tools:
hpacucli-9.10-22.0-esxi_mod.vib
hpbootcfg-01-01.02-esxi_mod.vib
hponcfg-04-00.10-esxi_mod.vib
char-hpilo-500.9.0.0.9-esxi_mod.vib

– Install HP tools on your non-HP ESXi server

scp *.vib root@esxserver:/tmp/
ssh root@esxserver
esxcli software vib install -f -v /tmp/hpacucli-9.10-22.0-esxi_mod.vib
esxcli software vib install -f -v /tmp/hpbootcfg-01-01.02-esxi_mod.vib
esxcli software vib install -f -v /tmp/hponcfg-04-00.10-esxi_mod.vib
esxcli software vib install -f -v /tmp/char-hpilo-500.9.0.0.9-1OEM.500.0.0.434156.x86_64-esxi_mod.vib

OR

– Get HP’s ESXi5 Offline Utilities
hp-HPUtil-esxi5.0-bundle-1.3-6.zip

– Install HP tools on your HP ESXi server
scp hp-HPUtil-esxi5.0-bundle-1.3-6.zip root@esxserver:/tmp/
ssh root@esxserver
esxcli software vib install -d /tmp/hp-HPUtil-esxi5.0-bundle-1.1-38.zip

After installing the tools, reboot ESXi server. Login again on your ESXi server using SSH or console.

– Check and expand logical drive to max
/opt/hp/hpacucli/bin/hpacucli controller slot=18 show config
/opt/hp/hpacucli/bin/hpacucli controller slot=18 array all show detail
/opt/hp/hpacucli/bin/hpacucli controller slot=18 logicaldrive 1 modify size=max
/opt/hp/hpacucli/bin/hpacucli controller slot=18 array all show detail
If you don’t know your controller slot number, use
/opt/hp/hpacucli/bin/hpacucli controller all show config

Reboot ESXi server. Login again on your ESXi server using SSH or console.

– Get the ID of your VMFS datastore
vmkfstools -P “/vmfs/volumes/datastore-nameIn my case:
Partitions spanned (on “lvm”):
mpx.vmhba1:C0:T0:L0:3

– Get the starting sector size of the VMFS partition
partedUtil getptbl “/vmfs/devices/disks/mpx.vmhba1:C0:T0:L0″

In my case:
3 10229760 573367046 AA31E02A400F11DB9590000C2911D1B8 vmfs 0

– Find usable sectors (free space)
partedUtil getUsableSectors “/vmfs/devices/disks/mpx.vmhba1:C0:T0:L0

In my case:
1146733318

– Resize VMFS partition
partedUtil resize “/vmfs/devices/disks/mpx.vmhba1:C0:T0:L03 10229760 1146733318

– Grow VMFS partition
vmkfstools –growfs “/vmfs/devices/disks/mpx.vmhba1:C0:T0:L0:3” “/vmfs/devices/disks/mpx.vmhba1:C0:T0:L0:3

Yes, you need to specify twice the same partition.

– Refresh the datastore in vSphere

New situation:

Done.

Loading drivers in ESXi 5.0

So I upgraded to 5 from 4.1 – Cool. Almost. Vanilla install had no support for my Promise SuperTrak EX-8654 card which I have in my HP MircoServer. Now what?!?!?
Well, after a lot of searches, the solution was actually on the Promise site! Yay for them!

So in short an example of you to load a driver on esxi 5.0.

1) Enable ssh access on your esxi 5 host (what do you mean you’ve already done that? It’s dangerous!)

2) Get you driver. The 8654 driver I got from the Promise support site was called 'scsi-stex-4.07.0000.75-1OEM.500.0.0.472560.x86_64.vib'. Yep, what’s in a name.

3) Copy over the driver to the host using scp
ex: scp <driver name> root@<esxi_5_host_ip>:/tmp

4) Next ssh to the esxi host, go to /tmp

5) Install the driver
esxcli software vib install -v /tmp/<driver name>

6) Reload the esxi host – Oh I hand’t told you? Well you need the driver right?

7) Then ssh to the esxi host and check if the driver loaded with 'esxcli software vib list'
In my specific case it looked like this:

~ # esxcli software vib list
Name        Version                             Vendor   Acceptance Level  Install Date
----------  ----------------------------------  -------  ----------------  ------------
scsi-stex   4.07.0000.75-1OEM.500.0.0.472560    Promise  VMwareCertified   2011-12-26

8) Sit back and enjoy the fact you have access to the disks again for adding as a datastore.