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.