Free Essay

Lun or Detaching a Datastore

In:

Submitted By stupidass
Words 850
Pages 4
Purpose
This article provides steps to unmount a LUN from an ESXi 5.x/6.0 host, which includes unmounting the file system and detaching the device. These steps must be performed for each ESXi host.

Note: The documented method using the vSphere Client is limited to detaching the device on a per-host basis. To detach a storage device from multiple hosts at the same time, see Automating detaching datastores using PowerCLI and the vSphere SDK for Perl in the Resolution section in this article.

For information on unmounting a datastore in ESXi/ESX 4.x, see Removing a LUN containing a datastore from VMware ESXi 4x and ESX 4.x (1029786).
Resolution
Removing a LUN in ESXi/ESX 4.x is complex. Improvements are made in ESXi 5.0 and later to streamline the procedure to make it easier for Administrators to remove LUNs.

Unmounting a LUN checklist

Before unmounting a LUN, ensure that:
If the LUN is being used as a VMFS datastore, all objects (such as virtual machines, snapshots, and templates) stored on the VMFS datastore are unregistered or moved to another datastore.

Note: All CD/DVD images located on the VMFS datastore must also be unregistered from the virtual machines.

The datastore is not used for vSphere HA heartbeat.
The datastore is not part of a datastore cluster. For more information on datastore clusters, see the vSphere 5.1 Resource Management Guide or vSphere 5.0 Resource Management Guide.
The datastore is not managed by Storage DRS. For more information on Storage DRS, see the vSphere 5.1 Resource Management Guide or vSphere 5.0 Resource Management Guide.
The datastore is not configured as a diagnostic coredump partition. For more information, see Configuring a diagnostic coredump partition on an ESXi 5.x host (2004299).
Storage I/O Control is disabled for the datastore. For more information, see the Managing Storage I/O Resources section in the vSphere 5.1 Resource Management Guide or vSphere 5.0 Resource Management Guide.
No third-party scripts or utilities running on the ESXi host can access the LUN that has issue. If the LUN is being used as a datastore, unregister all objects (such as virtual machines and templates) stored on the datastore.
If the LUN is being used as an RDM, remove the RDM from the virtual machine. Click Edit Settings, highlight the RDM hard disk, and click Remove. Select Delete from disk if it is not selected and click OK.

Note: This destroys the mapping file but not the LUN content.

Check if the LUN/datastore is used as the persistent scratch location for the host. For more information on persistent scratch, see Creating a persistent scratch location for ESXi 4.x and 5.x (1033696).

This PowerCLI script can be used to check the current scratch location:

$vcServer = "vCenter01"
$cluster = "CL01"
$esxCred = Get-Credential
Connect-VIServer $vcServer | Out-Null
#Connect to ESX hosts in cluster foreach ($esx in Get-Cluster $cluster | Get-VMHost) {
Connect-VIServer $esx -Credential $esxCred | Out-Null
Get-VMHostAdvancedConfiguration -Name "ScratchConfig.ConfiguredScratchLocation"
}
Note: When using the vSphere Web Client with vSphere 5.1, 5.5, and 6.0, only these checks are performed during the datastore unmount operation:
Host should not have any virtual machines residing on this datastore
Host should not use the datastore for HA heartbeats
Obtaining the NAA ID of the LUN to be removed

From the vSphere Client, this information is visible in the Properties window of the datastore.

From the ESXi host, run this command:

# esxcli storage vmfs extent list

You see output similar to:

Volume Name VMFS UUID Extent Number Device Name Partition
----------- ----------------------------------- ------------- ------------------------------------ --------- datastore1 4de4cb24-4cff750f-85f5-0019b9f1ecf6 0 naa.6001c230d8abfe000ff76c198ddbc13e 3
Storage2 4c5fbff6-f4069088-af4f-0019b9f1ecf4 0 naa.6001c230d8abfe000ff76c2e7384fc9a 1
Storage4 4c5fc023-ea0d4203-8517-0019b9f1ecf4 0 naa.6001c230d8abfe000ff76c51486715db 1
LUN01 4e414917-a8d75514-6bae-0019b9f1ecf4 0 naa.60a98000572d54724a34655733506751 1

Make a note of the NAA ID of the datastore to use this information later in this procedure.

Note: Alternatively, you can run the esxcli storage filesystem list command, which lists all file systems recognized by the ESXi host.

Unmounting a LUN using the vSphere Client

To detach a storage device using the vSphere Client, see the Detach Storage Devices section in the vSphere 5.0 Storage Guide.

Caution: You must successfully unmount the datastore using the documented method prior to completing the steps described below. For more information, see the Unmount VMFS or NFS Datastores section in the vSphere 5.0 Storage Guide.

To unmount a LUN from an ESXi 5.0 host using the vSphere Client:
If the LUN is an RDM, skip to step 2. Otherwise, in the Configuration tab of the ESXi host, click Storage. Right-click the datastore being removed and click Unmount.

A Confirm Datastore Unmount window appears. When the prerequisite criteria have been passed, click OK.

Note: To unmount a datastore from multiple hosts in the vSphere Client, click Hosts and Clusters > Datastores and Datastore Clusters view (Ctrl+Shift+D). Perform the unmount task and select the appropriate hosts that should no longer access the datastore to be unmounted.

Click the Devices view (under Configuration > Storage):

Similar Documents

Premium Essay

Vmware

...vSphere Upgrade vSphere 5.0 ESXi 5.0 vCenter Server 5.0 vSphere Client 5.0 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs. EN-000589-01 vSphere Upgrade You can find the most up-to-date technical documentation on the VMware Web site at: http://www.vmware.com/support/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: docfeedback@vmware.com Copyright © 2009–2011 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. VMware, Inc. 3401 Hillview Ave. Palo Alto, CA 94304 www.vmware.com 2 VMware, Inc. Contents About vSphere Upgrade Updated Information 7 5 1 About the Upgrade Process 9 2 How vSphere 5.0 Differs from vSphere 4.x 11 3 System Requirements 13 ESXi Hardware Requirements 13 ESXi Support for 64-Bit Guest Operating Systems 16 vCenter Server and vSphere Client Hardware Requirements 16 vCenter Server Software...

Words: 71822 - Pages: 288