Cannot unmount snapshot datastores from vCenter Server or a VI Client
search cancel

Cannot unmount snapshot datastores from vCenter Server or a VI Client

book

Article ID: 310408

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • An ESX or ESXi 4.x host recognizes a datastore as a possible snapshot LUN
  • The datastore is mounted by ESX and appears under Storage in the vSphere Client
  • Attempting to right-click and unmount the datastore in the vSphere Client fails silently

snapshot-lun cannot-unmount-vmfs-datastore


Environment

VMware ESX 4.0.x
VMware ESXi 4.1.x Installable
VMware ESXi 4.1.x Embedded
VMware ESX 4.1.x
VMware ESXi 4.0.x Installable

Resolution

This issue occurs because the ESX host is configured to allow mounting of datastores on snapshot LUNs using the advanced configuration option /LVM/DisallowSnapshotLUN. In this case, the datastore is successfully unmounted, but a rescan is issued immediately after and the datastore is remounted. This is a hidden setting in ESX 4.x and can only be changed via the command line.

To determine the value of this setting:
  1. Log in to each of these ESX 4.x hosts via the console or SSH.

  2. Run the esxcfg-advcfg command on each host to determine the current value of the setting:

    esxcfg-advcfg -g /LVM/DisallowSnapshotLUN

To unmount all datastores on snapshot LUNs:

  1. Log in to each of these ESX 4.x hosts via the console or SSH.

  2. Run this command on each host to determine if it has the datastores to be mounted:

    esxcfg-scsidevs -m

  3. To disallow mounting of snapshot LUNs, run this command to set the default value of 1:

    esxcfg-advcfg -s 1 /LVM/DisallowSnapshotLUN

  4. From the Storage tab in the vSphere Client, rescan the storage on all ESX hosts.
  5. Review the Storage tab in the vSphere Client to ensure that the datastores have been removed from the inventory.

    Caution: If the datastores are still visible, there is active I/O to them that must be stopped before proceeding. Removing access to LUNs with active I/O will result in an All Paths Down condition.

  6. In the storage array, unpresent the LUN hosting the datastores, so that they are no longer accessible by the ESX hosts. For more information, see Removing a LUN containing a datastore from VMware ESXi/ESX 4.x (1029786),
  7. Rescan the storage on all ESX hosts.
  8. Review the Storage tab in the vSphere Client to ensure that the LUNs have been removed from the inventory.

Note: If there are several mounted datastores on snapshot LUNs, changing the value of /LVM/DisallowSnapshotLUN may unmount other snapshot datastores.

To unmount some, but not all, datastores on snapshot LUNs:

  1. Log in to each of these ESX hosts via the console or SSH.

  2. Run this command on each host to determine if it has the datastores to be unmounted:

    esxcfg-scsidevs -m

  3. On each host that has the datastores to be unmounted, run this command to unmount the datastores:

    esxcfg-volume -u /vmfs/volumes/<datastore-name>

  4. From the Storage tab in the vSphere Client, rescan the storage on all ESX hosts.
  5. Review the Storage tab in the vSphere Client to ensure that the datastores have been removed.

    Caution: If the datastores are still visible, there is an active I/O to them that must be stopped before proceeding. Removing access to LUNs with active I/O results in an All Paths Down condition.

  6. On the storage array, unpresent the LUN hosting the datastores, so that they are no longer accessible by the ESX hosts. For more information, see Removing a LUN containing a datastore from VMware ESXi/ESX 4.x (1029786),
  7. Rescan the storage on all ESX hosts.
  8. Review the Storage tab in the vSphere Client to ensure that the LUNs have been removed.


Additional Information

Removing a LUN containing a datastore from VMware ESXi/ESX 4.0 and 4.1