Script to rescan iSCSI targets for HP StoreVirtual VSA datastores

I see more and more 3-server-datacenter installations being deployed. I wonder if this has something to do with the popular VMware Essentials license bundle and/or the free StoreVirtual VSA that is given with each HP Proliant Gen8 server for free.

And why not? My own BITCON datacenter VSA-based SAN volume has an uptime of more than 4,5 years at this moment, so it is great technology after all.

However! When you are busy with extensive HA tests (pull out all possible cables, shut down a complete server or network switch) you will see that the data always stays available, that’s why you have Network RAID right?

Having the data is one thing, having access to it is not so obvious apparently.
Here it is not HP but VMware that lacks some functionality. And more in particular the vSphere’s boot process.
VSphere looks for all datastores that hold virtual machines on DAS, NAS and SAN based storage during boot. However since the VSA is not started yet (vSphere is still booting remember?) there is no iSCSI based SAN!

After some time vSphere gives up and starts the VM’s it can see: the VSA…
The other VM’s? Bad luck… You can only start them after having rescanned the host’s storage adapters…

This is a true chicken-and-egg problem that needed a solution. The HP Converged Systems team (who are using VSA based storage as well in their CS300) searched and found a solution…

hpconvergedsystem

They created a script that will rescan the storage adapters for a duration of 30 minutes, or until vSphere has connected to all of them. The script is fired up in the final stages of the vSphere boot-up. No configuration or integration needed apart from getting the script onto all your vSphere hosts.How do you know which iSCSI targets we need? vSphere itself maintains a list of iSCSI targets it was connected to before.

The script is available as a Offline Bundle so it can be integrated into custom vSphere installation images or the vSphere Installation Bundle (VIB) can also be installed using VMware Update Manager.
Alternatively, you can install the VIB from the command-line interface from its online location or local file system (if you want to SCP the file the vSphere host).

Remark: This is not applicable for Hyper-V based installations.
When Windows Server boots up, iSCSI targets that are not available stay in their “Reconnecting…” state until the storage comes online. Once the file systems that hold your virtual machines become available, Hyper-V will start the guest systems after some time.

 

You can download the script on the HP VIBSdepot.

Author: Bart Heungens

Share This Post On
%d bloggers like this: