Unmount Datastore RDM Luns with IScsi Session Deactivation


We will be using both storage adapter and storage contexts to identify and unmount an RDM.

Important Note: The RDM must be deleted from VM prior to this procedure.

lun1

Goto configuration->storage

Identify the lun path by matching the label in the runtime name and noting the controller, target and lun C1:T17:L0

lun2

Also verify the naa identifier for the lun for an extra sanity check.

lun3

Goto storage tab to view all datastores.

lun4

However RDM will not appear in the datastore tab. To see RDM switch to the devices tab.

lun5

Select the RDM and right click and select detach from the option.

A dialog box will appear. Hit OK if you are sure that you select the correct entity to be removed.

lun6

You can view the detach task progress in the task bar.

lun8

The storage devices window will show the device as unmounted and the path disabled.

lun9

lun10

These systems are using the round robin persistent storage path. The secondary device does not allow the method shown above to unmount the lun. The path shows in the storage adapter device and path list but not under storage. For all datastores only the first path is shown.

So to unmount the LUN from all device use the command line.

# esxcli storage nmp path list -d naa.6000eb38e8fb49de00000000000002a0

iqn.1998-01.com.vmware:esxlr4sx-537a19fb-00023d000001,iqn.2003-10.com.lefthandnetworks:vmgroup1:672:nusaldb02,t,1-naa.6000eb38e8fb49de00000000000002a0

Runtime Name: vmhba37:C0:T17:L0

Device: naa.6000eb38e8fb49de00000000000002a0

Device Display Name: LEFTHAND iSCSI Disk (naa.6000eb38e8fb49de00000000000002a0)

Group State: off

Array Priority: 0

Storage Array Type Path Config: SATP VMW_SATP_DEFAULT_AA does not support path configuration.

Path Selection Policy Path Config: {current: no; preferred: no}

iqn.1998-01.com.vmware:esxlr4s4-537a19fb-00023d000002,iqn.2003-10.com.lefthandnetworks:vmgroup1:672:nusaldb02,t,1-naa.6000eb38e8fb49de00000000000002a0

Runtime Name: vmhba37:C1:T17:L0

Device: naa.6000eb38e8fb49de00000000000002a0

Device Display Name: LEFTHAND iSCSI Disk (naa.6000eb38e8fb49de00000000000002a0)

Group State: active

Array Priority: 0

Storage Array Type Path Config: SATP VMW_SATP_DEFAULT_AA does not support path configuration.

Path Selection Policy Path Config: {current: yes; preferred: yes}

# esxcli storage core device set –state=off -d naa.6000eb38e8fb49de00000000000002a0

Problem still persists. We are unable to disable path. When “esxcli storage core device detached lists” command is used it returned the following:

# esxcli storage core device detached list                                         

Device UID                                                                            State

————————————  —————————

naa.6000eb38e8fb49de00000000000002a0              off

On trying from GUI itself following error was encountered:

lun11

Finally after doing some googling I came to find out we have to remove iscsi session.

# esxcli iscsi session list –name=iqn.2003-10.com.lefthandnetworks:vmgroup1:672:nusaldb02 –adapter=vmhba37

vmhba37,iqn.2003-10.com.lefthandnetworks:vmgroup1:672:nusaldb02,00023d000001

Adapter: vmhba37

Target: iqn.2003-10.com.lefthandnetworks:vmgroup1:672:nusaldb02

ISID: 00023d000001

TargetPortalGroupTag: 1

AuthenticationMethod: none

DataPduInOrder: true

DataSequenceInOrder: true

DefaultTime2Retain: 0

DefaultTime2Wait: 2

ErrorRecoveryLevel: 0

FirstBurstLength: 262144

ImmediateData: true

InitialR2T: false

MaxBurstLength: 262144

MaxConnections: 1

MaxOutstandingR2T: 1

TSIH: 103

vmhba37,iqn.2003-10.com.lefthandnetworks:vmgroup1:672:nusaldb02,00023d000002

Adapter: vmhba37

Target: iqn.2003-10.com.lefthandnetworks:vmgroup1:672:nusaldb02

ISID: 00023d000002

TargetPortalGroupTag: 1

AuthenticationMethod: none

DataPduInOrder: true

DataSequenceInOrder: true

DefaultTime2Retain: 0

DefaultTime2Wait: 2

ErrorRecoveryLevel: 0

FirstBurstLength: 262144

ImmediateData: true

InitialR2T: false

MaxBurstLength: 262144

MaxConnections: 1

MaxOutstandingR2T: 1

TSIH: 102

# esxcli iscsi session remove –name=iqn.2003-10.com.lefthandnetworks:vmgroup1:672:nusaldb02 –adapter=vmhba37

# esxcli iscsi session list –name=iqn.2003-10.com.lefthandnetworks:vmgroup1:672:nusaldb02 –adapter=vmhba37

# esxcli storage core device detached list

Device UID                            State

————————————  —–

naa.6000eb38e8fb49de00000000000002a0  off

Now one path is off the other dead

# esxcli storage nmp path list -d naa.6000eb38e8fb49de00000000000002a0

iqn.1998-01.com.vmware:esxlr4s4-537a19fb–

Runtime Name: vmhba37:C0:T17:L0

Device: naa.6000eb38e8fb49de00000000000002a0

Device Display Name: LEFTHAND iSCSI Disk (naa.6000eb38e8fb49de00000000000002a0)

Group State: off

Array Priority: 0

Storage Array Type Path Config: SATP VMW_SATP_DEFAULT_AA does not support path configuration.

Path Selection Policy Path Config: PSP VMW_PSP_RR does not support path configuration.

iqn.1998-01.com.vmware:esxlr4s4-537a19fb–

Runtime Name: vmhba37:C1:T17:L0

Device: naa.6000eb38e8fb49de00000000000002a0

Device Display Name: LEFTHAND iSCSI Disk (naa.6000eb38e8fb49de00000000000002a0)

Group State: dead

Array Priority: 0

Storage Array Type Path Config: SATP VMW_SATP_DEFAULT_AA does not support path configuration.

Path Selection Policy Path Config: PSP VMW_PSP_RR does not support path configuration.

About Alex Hunt

Hi All I am Manish Kumar Jha aka Alex Hunt. I am currently working in VMware Software India Pvt Ltd as Operations System Engineer (vCloud Air Operations). I have around 5 Years of IT experience and have exposure on VMware vSphere, vCloud Director, RHEL and modern data center technologies like Cisco UCS and Cisco Nexus 1000v and NSX. If you find any post informational to you please press like and share it across social media and leave your comments if you want to discuss further on any post. Disclaimer: All the information on this website is published in good faith and for general information purpose only. I don’t make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this blog is strictly at your own risk. The Views and opinions published on this blog are my own and not the opinions of my employer or any of the vendors of the product discussed.
This entry was posted in Vmware. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s