How to correctly remove a LUN from ESXi (or how to avoid All Paths Down APD)

ESXi5 vmware

In order to correctly remove a LUN from ESXi certain steps must be taken before unplugging the storage device merrily from ESXi if you wish to avoid the dreaded All Paths Down issue.

 

All Paths Down (APD) is when an ESXi server has lost all access to active paths (usually multipathed) storage device. The ESXi server continues to try and access the storage however and this is where the issues start. The hostd service is also responsible for many other tasks including vcenter communication. Loosing access to the active paths of the storage device locks the hostd service and it will continuely try to access the storage meaning no other services that hostd is responsible will get a look in. In this respect the ESXi server will effectivly drop off vcenter and become unmanagable until the links are removed and the ESXi server is rebooted. VM’s will still be running without effect however as the ESXi server is effectivly disconnected then you will not be able to do anything other than schedule in some downtime and shutdown the guest vm’s via RDP or putty and then reboot the ESXi server after removing the dead paths.  Clearly this is a situation to be avoided.

 

To remove a LUN from an ESXi server:

1/ Firstly ensure that all vm’s and templates etc are migrated away from the LUN.

2/ Check that Storage IO Control and other tools by 3rd partys are not accessing the LUN

3/ Right click on the LUN and select UNMOUNT (presuming your not using any third party storage tools, if you are check your best practice docs with those partys).

4/ Rescan the host to ensure it cleanly removes the paths

5/ Remove the LUN from the storage device itself.

Following these guidelines should see you right and steer you away from an APD event which is a rather undesirable position to  be in.

 

Author: Dale Scriven

 

 

2 thoughts on “How to correctly remove a LUN from ESXi (or how to avoid All Paths Down APD)

Leave a Reply