Tuesday, December 31, 2013

Error: Virtual disk 'Hard disk x' is a mapped direct-access LUN that is not accessible

Our exchange server 2010 VM has RDMs for each database. Overnight the volumes filled up after commvault snapshots of database volumes which took the volume offline and stopped the VM.
Reading online it seems this problemalso occur when users try to vMotion a VM but that has not happened in my case.

The VM was rebooted by the Exchange admin but during start up the VM gave the following error message:

Virtual disk 'Hard disk x' is a mapped direct-access LUN that is not accessible

Troubleshooting:

On vsphere client when selecting the Hard disk and selecting manage paths you get errors "there is no multipath configuration for this LUN"


Identify if the Raw Data Mapping (RDM) LUN signature vml.############ assigned to the VM no longer matches the physical LUN assigned to the ESXi Host.
  • On VM record the physical LUN mapping vml.########
  • On ESXi host where VM resides run command to find the device name entry naa.############ for the vml identifier of VM.  The "Other UIDs:" displays the vml identifier.
  • On each ESXi host within the cluster verify that the device name has the same vml entry as what is associate to virtual machine hard disk.
    • ls -alh /vmfs/devices/disks

Solution 1:

This was my first try without consulting online and did not want to remove the Mapped Raw LUN from the VM so to fix this I did the following:

  1. I disabled the problem LUN on the back-end storage (our case Netapp) and then on each host i re-scanned the storage so that the devices was not showing anymore.
  2. I enabled the problem LUN again and rescanned the hosts.
  3. Make sure the device is showing again.
  4. Verify that the datastore mapping file (vml.######) was identical on VM to that on each ESXi host in the cluster for the particular problem hard drive.
  5. Started up the VM and problem was resolved.
If this solution does not work for you, then i would recommend using solution 2 which is pretty much straight from the VMware KB 1016210

Solution 2:

Identify the problem hard drive and record the following settings on virtual machine:
  • Mapped Raw LUN's - physical LUN and datastore mapping file location. (vml.############)
  • SCSI ID
  • Associated LUN ID
    • to get this information you need to run a few commands on ESXi host where VM currently resides
      • ls -alh /vmfs/devices/disks (this will give device indentifier from RDM vml address.
      • esxcli storage core path list (shows device identifier with LUN information) 
  • Remove the RDM LUN
  • Map the RDM LUN again within the VM.  This will be done by snapdrive agent on server.
  • Power on the VM.


Links: