VMware Cloud Community
filibertoeduard
Contributor
Contributor
Jump to solution

Vmware after electric outages.

Team of experts!!

I have a long time without discover a solution.

"use a RESCAN of datastorages in automatically in VMware 5.1 or 6".

In Mexico is very common to have with frecuency a lot of electric outages,

for any reason every time when occurs a outage in my sites.

Power on first my Hosts Servers, and not detected my san storage because take more time in put online.

(My SAN VNXe3200 or VNXe3300 takes more time in respond) than the local servers hp.

I always have the same task of connect remotely with my vsphere client - connect with each host and run "rescan storages" manually for detecting the datastores and power on the virtual machines.

Exist some method or parameter to change for avoid it? maybe doing in automatically, or procedure for reply the datastores until detected.

What can you recommend me do?

0 Kudos
1 Solution

Accepted Solutions
martinriley
Hot Shot
Hot Shot
Jump to solution

Hi there,

I have a similar issue with some of my hosts in Brazil, I needed a way to make the host wait for a local VSA to boot before scanning the adapters.

Here's one way you could do it, on the host there is a script file which is run at boot which is /etc/rc.local

If you have an idea how long it takes for your VNX to come online then you can just append the rc.local script with a 'sleep' command followed by an adapter rescan.  for example if your storage takes 60 seconds to come online you can add the following to the end of rc.local to make it wait, then rescan for datastores:

sleep 60

/sbin/esxcfg-rescan -A

Once you've amended and saved the rc.local, run /sbin/auto-backup.sh to make sure it's backed up.

It's a bit dirty but should do the trick- you could probably do something more clever around checking if the storage is online as opposed to the fixed 'sleep' duration but off the top of my head this might work!!

Hope this helps!

vM

-----------------------

VCAP-DCD / VCAP-DCA / VCP-CLOUD / VCP-DT / VCP5 / VCP4

-----------------------

vMustard.com

View solution in original post

0 Kudos
2 Replies
martinriley
Hot Shot
Hot Shot
Jump to solution

Hi there,

I have a similar issue with some of my hosts in Brazil, I needed a way to make the host wait for a local VSA to boot before scanning the adapters.

Here's one way you could do it, on the host there is a script file which is run at boot which is /etc/rc.local

If you have an idea how long it takes for your VNX to come online then you can just append the rc.local script with a 'sleep' command followed by an adapter rescan.  for example if your storage takes 60 seconds to come online you can add the following to the end of rc.local to make it wait, then rescan for datastores:

sleep 60

/sbin/esxcfg-rescan -A

Once you've amended and saved the rc.local, run /sbin/auto-backup.sh to make sure it's backed up.

It's a bit dirty but should do the trick- you could probably do something more clever around checking if the storage is online as opposed to the fixed 'sleep' duration but off the top of my head this might work!!

Hope this helps!

vM

-----------------------

VCAP-DCD / VCAP-DCA / VCP-CLOUD / VCP-DT / VCP5 / VCP4

-----------------------

vMustard.com

0 Kudos
filibertoeduard
Contributor
Contributor
Jump to solution

Sound great your idea! but I have entered by ssh in my hosts but I cant edit the file rc.local, only is opened like read only,

I edited with vi rc.local

I typed the 2 commands in the last, same like you recommend me and final put esc : wq or only q

but display that permission denied.

How Can i have access of rw in this file?

0 Kudos