Recently i extended my RAID 5 array by replacing one-by-one hdd’s with bigger ones and waiting for each to rebuild.
All the instructions are executed on a HP DL360 G6 with an SmartArray P410i controller with only one logicaldisk.
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 leas 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.
First you have to install HP’s ESXi5 Offline Utilities right from here
Upload it to your datastore, login to your ESXi5 server and execute
esxcli software vib install -d/path/to/hp-HPUtil-esxi5.0-bundle-1.1-38.zip
Now you can see the array rebuild with
/opt/hp/hpacucli/bin/hpacucli controller slot=0 show config
** Warning: Add a new hard disk ONLY if ALL harddisks show “OK” **
After adding all the disks without destroying the array you can now see unused space here:
/opt/hp/hpacucli/bin/hpacucli controller slot=0 array all show detail
Now let’s extend the array to use up the new space:
/opt/hp/hpacucli/bin/hpacucli controller slot=0 logicaldrive 1 modify size=max
A second call to show detail of the array should show you that the unused space is again zero, now your logicaldrive is successfully extended!
/opt/hp/hpacucli/bin/hpacucli controller slot=0 array all show detail
Now on to the datastore part. Unfortunatly it is not possible to extend or expand the datastore from within the GUI because the “VMWare extend” is for adding several sources of Partitions, NFS mounts etc. to one “big” datastore and not expanding the partition to fill up the new space we won.
First we need to find what disk we are using, as i’m have only one logical disk, this is easy for me, be sure to select the correct disk from: /vmfs/devices/disks/
let have a look at the partitioning table:
partedUtil getptbl /vmfs/devices/disks/vml.0200010000600508b1001c504c1f73b6b6947016164c4f47494341
gpt
109406 255 63 1757614684
1 64 8191 C12A7328F81F11D2BA4B00A0C93EC93B systemPartition 128
5 8224 520191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
6 520224 1032191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
7 1032224 1257471 9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0
8 1257504 1843199 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
2 1843200 10229759 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
3 10229760 860050190 AA31E02A400F11DB9590000C2911D1B8 vmfs 0
The last line is the one we are intrested in, the VMFS partition. For me it is the Partition number 3 with start-sector at 10229760 and end-sector at 860050190.
We now need to know the last sector of the Harddisk we could use up, give that a shot:
partedUtil getUsableSectors /vmfs/devices/disks/vm.0200010000600508b1001c504c1f73b6b6947016164c4f47494341
This is what i get back: 1757614650
Now i can go and extend the partition where my datastore lives in:
partedUtil resize “/vmfs/devices/disks/vml.0200010000600508b1001c504c1f73b6b6947016164c4f47494341″ 3 10229760 1757614650
Note the last 3 arguments: Partition 3, start-sector and new last-sector
After that has been done without output we will stright go and expand the Filesystem of our VMFS partition to fill it up:
vmkfstools –growfs /vmfs/devices/disks/vml.0200010000600508b1001c504c1f73b6b6947016164c4f47494341:3 /vmfs/devices/disks/vml.0200010000600508b1001c504c1f73b6b6947016164c4f47494341:3
Again, note the :3 at the end..
http://devbios.wordpress.com/2012/04/21/esxi-5-expanding-datastore-by-extending-local-array/