VMware Cloud Community
imansour
Contributor
Contributor

Need help with writing a script to show if LUNS are presented to ESX host

Hello,

I don't have experience with scripting, and I am looking for any one out there that could help me with writing a bash script.

We are using HP RDP to deploy ESX 3.5 servers and we are trying to avoid writing to any presented LUNs during deployment, incase we mistakenly run a job to deploy a server without unpresenting the LUNs. So I am looking to create an HP RDP job that will run a script before starting ESX deployment to do the following:

1. search if any LUNs presented to ESX host

2. If any LUNS available, then I need to display an error with maybe an error code, then exit the script

3. If no LUNs available, then mark as successfull and contiue to the next RDP job.

Thank you

0 Kudos
2 Replies
Rubeck
Virtuoso
Virtuoso

I don't know RDP at all, but maybe using ESX install files where HBA

drivers have been removed during the ESX setup would prevent deleting

of any existing SAN volume... That would ofc require you to install

ESX on local disks if these are available..

Got no idea on the error message scripting part... sorry...

The script used for altering an downloaded .iso is removehba.sh...

http://www.jume.nl/index.php?option=com_content&task=view&id=111

/Rubeck

0 Kudos
imansour
Contributor
Contributor

One of the jobs in RDP used to deploy ESX on HP servers will format the disks with GRUP.img after it boots to a LinuxPE boot image (before it starts copying files and installing ESX), and this job formats the first disk/LUN it sees. So I am looking for a way to prevent that from happening in case a LUN is presented.

I can ask the RDP job\task to format certain disk by adding -dx, but I would need to find out first the disk number I am trying to deploy ESX on, and that could change by the amount of LUNs presented to ESX.

We tried to remove the HBA drivers from LinuXPE boot image but that did not work.

0 Kudos