Wednesday 25 April 2012

Permanent Device Loss -Planned/Unplanned.



Planned versus unplanned PDL

A planned PDL occurs when there is an intent to remove a device presented to the ESXi host. The datastore must first be unmounted, then the device needs to be detached before the storage device is unpresented at the storage array.
1.  esxcli storage filesystem  list --> get the vmfs datastore name
2.  esxcli storage filesystem unmount -l Data_Store_Name --> unmount the datastore
3.  esxcli storage core device set --state=off -d naa.xxxx  --> set the device state to off and safely remove the device.

An unplanned PDL occurs when the storage device is unexpectedly unmapped from the storage array without the unmount and detach being executed on the ESXi host. To cleanup an unplanned PDL:
  1. All running virtual machines from the datastore must be powered off, easy way to do is, login to esxi , kill the vmx file of the respective vms.  and unregistered from the affected datastore. 
  2. From the vSphere Client, go to the Configuration tab of the ESXi host, click Storage.
  3. Right-click on the datastore being removed, and choose Unmount.

    A Confirm Datastore Unmount window displays. When the prerequisite criteria have been passed, the OK button appears.
  4. Perform a rescan on all of the ESXi hosts that had visibility to the LUN.
  5. After removing the device the paths to the device still shows "died", to remove the died paths to the device do rescan "esxcfg-rescan -d" or "esxcli storage core adapter  rescan  --adapter vmhbaxxx"

    Note
    : If there are active references to the device or pending I/O, the ESXi host still lists the device after the rescan..

No comments:

Post a Comment