Subscribe
Accepted Solution

How to find the WWPN that is performing I/O on the LUN ? (igroup with lots of wwpns)

Hello,

I have one igroup called "ESX_HOSTS" with 50 wwpns in it,

My "/vol/storage_esx/lun03" is mapped to the igroup "ESX_HOSTS".

I need to list wich one of this 50 wwpns is performing I/O on "/vol/storage_esx/lun03".

How do I list the WWPN that is performing I/O on this LUN ?

Thanks a lot. I'm starting with the Netapp products and really dont know how to do this by the

CLI.

I also dont have any other resources, the only thing that I can do is to log on the console using ssh.

Re: How to find the WWPN that is performing I/O on the LUN ? (igroup with lots of wwpns)

There isn't any way I know of to get individual initiator statistics from the cli, or otherwise in an FC environ.

I even did a browse through the counters from the 'stats' command.

You would be able to get these statistics from the individual hosts, or from your FC switches.

SANscreen collects this kind of data from the infrastructure to corelate and answer these kinds of questions.


I hope this response has been helpful to you.

At your service,


Eugene E. Kashpureff
ekashp@kashpureff.org
Fastlane NetApp Instructor and Independent Consultant
http://www.fastlaneus.com/ http://www.linkedin.com/in/eugenekashpureff

(P.S. I appreciate points for helpful or correct answers.)

Re: How to find the WWPN that is performing I/O on the LUN ? (igroup with lots of wwpns)

Well,

Actually we can do a lot more than one would think.

First, we would need to find which specific initiators are mapped to the LUN, and then find who holds any persistent reservation.  Since this is FCP we are dealing with here and not iSCSI, the reservation key is simply the WWNN of the HBA on the host holding the reservation.The ZAPI lun-initiator-list-map-info gives us information about which initiators are mapped to the LUN, and lun-get-persistent-reservation-info tells us who holds the reservation. Using the Data ONTAP Powershell Toolkit, we first find out which initators are mapped to our LUN.  To all the mappings by LUN:

Get-NaLun /vol/vol2/lun2 | Get-NaLunMap | ForEach-Object {$_.Initiators} | Get-NaLunMapByInitiator

Now, to see if there is a persistent reservation on the LUN:

Confirm-NaLunHasScsiReservation /vol/vol2/lun2

Where /vol/vol2/lun2 is the path to the LUN we are interested in.  Assuming there is a reservation (a True reseult), we can then get the reservation:

Get-NaLunPersistentReservation /vol/vol2/lun2

Since this is FCP, the key is the WWNN of the HBA holding the reservation.  

With the knowledge of the specific HBA that has an exclusive reservation to the LUN, we can then collect IO data on the LUN with:

get-nalunstatistics

If you need to clear the counters before collecting data, use:

clear-nalunstatistics.

John

Re: How to find the WWPN that is performing I/O on the LUN ? (igroup with lots of wwpns)

Thanks  a lot John, I'm installing the Powershell to test it.

I will send the results.

Re: How to find the WWPN that is performing I/O on the LUN ? (igroup with lots of wwpns)

I did a quick test with one of the LUN: "/vol/adc_netapp3_tier4_10/DS_Tier4_10"

Here follows:

PS C:\Documents and Settings\Administrator> Get-NaLun /vol/adc_netapp3_tier4_10/DS_Tier4_10

Path                                      TotalSize Protocol     Online Mapped  Thin  Comment
----                                      --------- --------     ------ ------  ----  -------
/vol/adc_netapp3_tier4_10/DS_Tier4_10      500.1 GB vmware        True   True  False


PS C:\Documents and Settings\Administrator> Get-NaLun /vol/adc_netapp3_tier4_10/DS_Tier4_10 | Get-NaLunMap


InitiatorGroupName            : VM_FCP
InitiatorGroupType            : fcp
Initiators                    : {50:01:43:80:00:bf:e7:9c, 50:01:43:80:00:bf:e4:4a, 50:01:43:80:00:bf:e4:7a, 50:01:43:80
                                :00:bf:e2:02...}
InitiatorGroupOsType          : vmware
InitiatorGroupPortsetName     :
InitiatorGroupThrottleBorrow  : False
InitiatorGroupThrottleReserve : 0
InitiatorGroupUsePartner      : True
InitiatorGroupAluaEnabled     : False
InitiatorGroupVsaEnabled      : False
LunId                         : 89

PS C:\Documents and Settings\Administrator> Confirm-NaLunHasScsiReservation /vol/adc_netapp3_tier4_10/DS_Tier4_10
False
PS C:\Documents and Settings\Administrator> Get-NaLunPersistentReservation /vol/adc_netapp3_tier4_10/DS_Tier4_10
Get-NaLunPersistentReservation : Unable to find API: lun-get-persistent-reservation-info
At line:1 char:31
+ Get-NaLunPersistentReservation <<<<  /vol/adc_netapp3_tier4_10/DS_Tier4_10
    + CategoryInfo          : InvalidOperation: (NetApp.Ontapi.Filer.NaController:NaController) [Get-NaLunPersistentRe
   servation], EAPIERROR
    + FullyQualifiedErrorId : ApiException,DataONTAP.PowerShell.SDK.Cmdlets.Lun.GetNaLunPersistentReservation

PS C:\Documents and Settings\Administrator> Get-nalunstatistics /vol/adc_netapp3_tier4_10/DS_Tier4_10

Path                                           Read    Written   Read Ops  Write Ops  Other Ops   Last Zeroed
----                                           ----    -------   --------  ---------  ---------   -----------
/vol/adc_netapp3_tier4_10/DS_Tier4_10        3.6 GB    14.9 GB       128k       710k        29k      04:52:30


PS C:\Documents and Settings\Administrator> Get-nalunstatistics /vol/adc_netapp3_tier4_10/DS_Tier4_10

Path                                           Read    Written   Read Ops  Write Ops  Other Ops   Last Zeroed
----                                           ----    -------   --------  ---------  ---------   -----------
/vol/adc_netapp3_tier4_10/DS_Tier4_10        3.7 GB    15.0 GB       130k       719k        29k      04:57:05


PS C:\Documents and Settings\Administrator> Confirm-NaLunHasScsiReservation /vol/adc_netapp3_tier4_10/DS_Tier4_10
False

As you can see, access to the LUN is constant (Write Ops and Read Ops always changing) but It did return "False" for ScsiReservation.

This LUN is been used by one VMWare ESX host cluster, it is formated using VMFS. I have a virtual machine running on it.

But shouldnt these ESX Hosts been reserving the LUN constantly ? Or these reservations are so quick that Im getting the intervals ? Or maybe they just access it from time to time ...

Anyway,

Thanks a lot John.

Re: How to find the WWPN that is performing I/O on the LUN ? (igroup with lots of wwpns)

confirm-nalunhasscsireservation is returning false.   The writes may be small enough that you're not catching the reservation before it is released.

J