3

In my DC admins have to unplug my FC connection from ESXi5 (from EMC VNX) (temporary, some maintance works). I have never done that before and have some doubt about my own procedure...

My first thought was to turn off all VM's (but only few are using storage mounten via FC), then turn off ESXi, then admins will do they work and after reconect I will turn on my ESXi and all VM's (I don't is this correct thinking).

Second plan was to turn off only VM's that uses mounted storage via FC then let admins unplug FC connection...

I'm not convinced about the two ways. So what is a proper procedure for unplugging fiber chanel from ESXi.

  • If you have multiple paths to your storage, you should have nothing to worry about. – xeon Aug 16 '13 at 6:22
  • @Xeon no I have only one... :/ – B14D3 Aug 16 '13 at 6:27
3

What version of ESXi hypervisor do you have installed? The following procedure is for ESXi 5.x and it is performed from GUI with vSphere client 5.x.

I would shutdown all the virtual machines on that datastore as you wrote, then I would remove/unregister all the machines from the inventory and finally I would unmount it which ensures that there is no active machine on it, there is no storage DRS running and so on. The successful unmount should present you this confirmation window

enter image description here

After confirmation, you can begin with maintenance of the storage. When you are finished mount the datastore and re-register the machines.

Finally, I would like to mention that if you had deployed vCenter server and proper licensing in your environment you you could use Storage vMotion feature to migrate the machines to another storage/datastore without any downtime.

  • Yup it's ESXi 5 ... – B14D3 Aug 16 '13 at 7:40
  • 1
    Why remove the VM's from inventory? – joeqwerty Aug 16 '13 at 14:47
1

If you have the time, the best way would be to shut down or suspend the VMs and unmount the data store (or even shut down the ESXi instance altogether if you do not have other VMs which have to keep running and do not depend on the data store) for the duration of the maintenance.

At times where you cannot afford the suspend/unmount/remount/restart cycle (e.g. if you have VMs which would take too long to either shut down or suspend and subsequently restart to possibly fit into the maintenance window), you might want to consider an entirely unsupported, hacky but very quick alternative:

  1. use SSH to log in to the console and halt your virtual machines by issuing STOP signals to the vcpu-<X>:<vmname> processes of the affected virtual machines kill STOP <pid> - this will stop execution and thus cease the VM's I/O.
  2. disconnect FC link(s) and do whatever you need to do (VMFS is quite robust in respect to disconnects)
  3. reconnect FC link(s)
  4. re-login to the target(s) - if you use QLogic's HBAs, use echo "scsi-qlalip"> /proc/scsi/qla2xxx/<hba#> on the console to do so
  5. let ESXi re-check the HBAs and see if the path(s) come up "Active" again and see if you can access the data store through the GUI
  6. unfreeze your VMs by issuing CONT signals to all vcpu-<X>:<vmname> processes you've STOPped before
  7. check if you need to adjust clocks since the VMs would not have received timer interrupts while STOPped

The most crucial point here is that you need to get the HBA to re-login, otherwise the ESXi instance would not be able to get to the store unless you reboot - this should be tested and verified to work beforehand, especially if you have non-QLogic HBAs (where the procedure has been quite well documented all over the web and which I personally can confirm to be working).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.