I want to know how people are doing this in their ESX environment. Now it is painful to add a LUN to it. I need to rescan every host from VC or run esxcfg-rescan vmhba0 from SC, and reflesh the storage for each host in order for the hosts to see the new LUN. Is there a quick way to rescan multiple ESX 3.0.1 servers when a new LUN is added?
Thanks for any help.
Hello,
You would need to either use the VIPerl Toolkit....
Setup RSA/DSA Authentication for SSH and run from a known host 'ssh admin@servername sudo /usr/sbin/esxcfg-rescan vmhba0' and perhaps allow this command to be run via sudo without a password....
Or use ssh without the RSA/DSA Authentication.... etc.
There is quite a bit that could happen here from a scripting perspective....
Best regards,
Edward
I haven't used it myself, but clusterssh may help you with this.
Thanks Texiwill, but it seems running esxcfg-rescan vmhba# won't make the storage shows up in VC, and sometimes I need to run esxcfg-rescan a couple times. Then I need to go to VC's ESX host-> Configuration-> Storage, and click on refresh it before I can see the LUN.
Thanks, I will take a look at it and give it a try.
Hi Byron,
try this command after esxcfg-rescan ... for adding or removing SAN LUNs or NAS datastore
vimsh -n -e "internalsvc/refresh_datastores"
about 10 sec. later the VC shows the updated datastores for that ESX.
So you can use this command scripted like esxcfg-rescan
Marvin