Home > Articles > Networking > Storage

  • Print
  • + Share This
This chapter is from the book

Listing Multipath Details

There are two ways by which you can display the list of paths to a given LUN, each of which are discussed in this section:

  • Listing paths to a LUN using the UI
  • Listing paths to a LUN using the CLI

Listing Paths to a LUN Using the UI

To list all paths to a given LUN in the vSphere 5.0 host, you may follow this procedure, which is similar to the procedure for listing all targets discussed earlier in Chapter 2, “Fibre Channel Storage Connectivity” Chapter 3 and Chapter 4:

  1. Log on to the vSphere 5.0 host directly or to the vCenter server that manages the host using the VMware vSphere 5.0 Client as a user with Administrator privileges.
  2. While in the Inventory—Hosts and Clusters view, locate the vSphere 5.0 host in the inventory tree and select it.
  3. Navigate to the Configuration tab.
  4. Under the Hardware section, select the Storage option.
  5. Under the View field, click the Devices button.
  6. Under the Devices pane, select one of the SAN LUNs (see Figure 5.11). In this example, the device name starts with DGC Fibre Channel Disk.
    Figure 5.11

    Figure 5.11. Listing storage devices

  7. Select Manage Paths in the Device Details pane.
  8. Figure 5.12 shows details for an FC-attached LUN. In this example, I sorted on the Runtime Name column in ascending order. The Paths section shows all available paths to the LUN in the format:
    • Runtime Name—vmhbaX:C0:Ty:Lz where X is the HBA number, y is the target number, and z is the LUN number. More on that in the “Preferred Path Setting” section later in this chapter.
    • Target—The WWNN followed by the WWPN of the target (separated by a space).
    • LUN—The LUN number that can be reached via the listed paths.
    • Status—This is the path state for each listed path.
    Figure 5.12

    Figure 5.12. Listing paths to an FC-attached LUN

  9. The Name field in the lower pane is a permanent one compared to the Runtime Name listed right below it. It is made up of three parts: HBA name, Target Name, and the LUN’s device ID separated by dashes (for FC devices) or commas (for iSCSI devices). The HBA and Target names differ by the protocol used to access the LUN.

Figure 5.12 shows the FC-based path Name, which is comprised of

  • Initiator Name—Made up from the letters FC followed by a period and then the HBA’s WWNN and WWPN. The latter two are separated by a colon (these are discussed in Chapter 3).
  • Target Name—Made up from the target’s WWNN and WWPN separated by a colon.
  • LUN’s Device ID—In this example the NAA ID is naa.6006016055711d00cff95e65664ee011, which is based on the Network Address Authority naming convention and is a unique identifier of the logical device representing the LUN.

Figure 5.13 shows the iSCSI-based path Name which is comprised of

Figure 5.13

Figure 5.13. Listing paths to an iSCSI-attached LUN

  • Initiator Name—This is the iSCSI iqn name discussed in Chapter 4.
  • Target Name—Made up from the target’s iqn name and target number separated by colons. In this example, the target’s iqn names are identical while the target numbers are different—such as t,1 and t,2. The second target info is not shown here, but you can display them by selecting one path at a time in the paths, pane to display the details in the lower pane.
  • LUN’s Device ID—In this example the NAA ID is naa.6006016047301a00eaed23f5884ee011, which is based on the Network Address Authority naming convention and is a unique identifier of the logical device representing the LUN.

Figure 5.14 shows a Fibre Channel over Ethernet (FCoE)-based path name, which is identical to the FC-based pathnames. The only difference is that fcoe is used in place of fc throughout the name.

Figure 5.14

Figure 5.14. Listing paths to an FCoE-attached LUN

Listing Paths to a LUN Using the Command-Line Interface (CLI)

ESXCLI provides similar details to what is covered in the preceding section. For details about the various facilities that provide access to ESXCLI, refer to the “Locating HBA’s WWPN and WWNN in vSphere 5 Hosts” section in Chapter 2.

The namespace of ESXCLI in vSphere 5.0 is fairly intuitive! Simply start with esxcli followed by the area of vSphere you want to manage—for example, esxcli network, esxcli software, esxcli storage—which enables you to manage Network, ESXi Software, and Storage, respectively. For more available options just run esxcli –help. Now, let’s move on to the available commands:

Figure 5.15 shows the esxcli storage nmp namespace.

Figure 5.15

Figure 5.15. esxcli storage nmp namespace

The namespace of esxcli storage nmp is for all operations pertaining to native multipathing, which include psp, satp, device, and path.

I cover all these namespaces in detail later in the “Modifying PSA Plug-in Configurations Using the UI” section. The relevant operations for this section are

  • esxcli storage nmp path list
  • esxcli storage nmp path list –d <device ID e.g. NAA ID>

The first command provides a list of paths to all devices regardless of how they are attached to the host or which protocol is used.

The second command lists the paths to the device specified by the device ID (for example, NAA ID) by using the -d option.

The command in this example is

esxcli storage nmp path list -d naa.6006016055711d00cff95e65664ee011

You may also use the verbose command option --device instead of -d.

You can identify the NAA ID of the device you want to list by running a command like this:

esxcfg-mpath -b |grep -B1 "fc Adapter"| grep -v -e "--" |sed 's/

Adapter.*//'

You may also use the verbose command option --list-paths instead of –b.

The output of this command is shown in Figure 5.16.

Figure 5.16

Figure 5.16. Listing paths to an FC-attached LUN via the CLI

This output shows all FC-attached devices. The Device Display Name of each device is listed followed immediately by the Runtime Name (for example, vmhba3:C0:T0:L1) of all paths to that device. This output is somewhat similar to the lagacy multipathing outputs you might have seen with ESX server release 3.5 and older.

The Device Display Name is actually listed after the device NAA ID and a colon.

From the runtime name you can identify the LUN number and the HBA through which they can be accessed. The HBA number is the first part of the Runtime Name, and the LUN number is the last part of that name.

All block devices conforming to the SCSI-3 standard have an NAA device ID assigned, which is listed at the beginning and the end of the Device Display Name line in the preceding output.

In this example, FC-attached LUN 1 has NAA ID naa.6006016055711d00cff95e65664ee011 and that of LUN0 is naa.6006016055711d00cef95e65664ee011. I use the device ID for LUN 1 in the output shown in Figure 5.17.

Figure 5.17

Figure 5.17. Listing pathnames to an FC-attached device

You may use the verbose version of the command shown in Figure 5.17 by using --device instead of -d.

From the outputs of Figure 5.16 and 5.17, LUN 1 has four paths.

Using the Runtime Name, the list of paths to LUN1 is

  • vmhba3:C0:T1:L1
  • vmhba3:C0:T0:L1
  • vmhba2:C0:T1:L1
  • vmhba2:C0:T0:L1

This translates to the list shown in Figure 5.18 based on the physical pathnames. This output was collected using this command:

esxcli storage nmp path list -d naa.6006016055711d00cff95e65664ee011 |grep
fc
Figure 5.18

Figure 5.18. Listing physical pathnames of an FC-attached LUN

Or the verbose option using the following:

esxcli storage nmp path list --device naa.6006016055711d00cff95e65664ee011
|grep fc

This output is similar to the aggregate of all paths that would have been identified using the corresponding UI procedure earlier in this section.

Using Table 2.1, “Identifying SP port association with each SP,” in Chapter 2, we can translate the targets listed in the four paths as shown in Table 5.3:

Table 5.3. Identifying SP Port for LUN Paths

Runtime Name

Target WWPN

Sp Port Association

vmhba3:C0:T1:L1

5006016941e06522

SPB1

vmhba3:C0:T0:L1

5006016141e06522

SPA1

vmhba2:C0:T1:L1

5006016841e06522

SPB0

vmhba2:C0:T0:L1

5006016041e06522

SPA0

Identifying Path States and on Which Path the I/O Is Sent—FC

Still using the FC example (refer to Figure 5.17), two fields are relevant to the task of identifying the path states and the I/O path: Group State and Path Selection Policy Path Config. Table 5.4 shows the values of these fields and their meanings.

Table 5.4. Path State Related Fields

Runtime Name

Group State

PSP Path Config

Meaning

vmhba3:C0:T1:L1

Standby

non-current path; rank: 0

Passive SP—no I/O

vmhba3:C0:T0:L1

Active

non-current path; rank: 0

Active-SP—no I/O

vmhba2:C0:T1:L1

Standby

non-current path; rank: 0

Passive SP—no I/O

vmhba2:C0:T0:L1

Active

current path; rank: 0

Active SP—I/O

Combining the last two tables, we can extrapolate the following:

  • The LUN is currently owned by SPA (therefore the state is Active).
  • The I/O to the LUN is sent via the path to SPA Port 0.

Example of Listing Paths to an iSCSI-Attached Device

To list paths to a specific iSCSI-attached LUN, try a different approach for locating the device ID:

esxcfg-mpath -m |grep iqn

You can also use the verbose command option:

esxcfg-mpath --list-map |grep iqn

The output for this command is shown in Figure 5.19.

Figure 5.19

Figure 5.19. Listing paths to an iSCSI-attached LUN via the CLI

In the output, the lines wrapped. Each line actually begins with vmhba35 for readability. From this ouput, we have the information listed in Table 5.5.

Table 5.5. Matching Runtime Names with Their NAA IDs

Runtime Name

NAA ID

vmhba35:C0:T1:L0

naa.6006016047301a00eaed23f5884ee011

vmhba35:C0:T0:L0

naa.6006016047301a00eaed23f5884ee011

This means that these two paths are to the same LUN 0 and the NAA ID is naa.6006016047301a00eaed23f5884ee011.

Now, get the pathnames for this LUN. The command is the same as what you used for listing the FC device:

esxcli storage nmp path list -d naa.6006016047301a00eaed23f5884ee011

You may also use the verbose version of this command:

esxcli storage nmp path list --device naa.6006016047301a00eaed23f5884ee011

The output is shown in Figure 5.20.

Figure 5.20

Figure 5.20. Listing paths to an iSCSI-attached LUN via CLI

Note that the path name was wrapped for readability.

Similar to what you observed with the FC-attached devices, the output is identical except for the actual path name. Here, it starts with iqn instead of fc.

The Group State and Path Selection Policy Path Config shows similar content as well. Based on that, I built Table 5.6.

Table 5.6. Matching Runtime Names with Their Target IDs and SP Ports

Runtime Name

Target IQN

Sp Port Association

vmhba35:C0:T1:L0

iqn.1992-04.com.emc:cx.apm00071501971.b0

SPB0

vmhba35:C0:T0:L0

iqn.1992-04.com.emc:cx.apm00071501971.a0

SPA0

To list only the pathnames in the output shown in Figure 5.20, you may append |grep iqn to the command.

The output of the command is listed in Figure 5.21 and was wrapped for readability. Each path name starts with iqn:

esxcli storage nmp path list --device naa.6006016047301a00eaed23f5884ee011
|grep iqn
Figure 5.21

Figure 5.21. Listing pathnames of iSCSI-attached LUNs

Identifying Path States and on Which Path the I/O Is Sent—iSCSI

The process of identifying path states and I/O path for iSCSI protocol is identical to that of the FC protocol listed in the preceding section.

Example of Listing Paths to an FCoE-Attached Device

The process of listing paths to FCoE-attached devices is identical to the process for FC except that the string you use is fcoe Adapter instead of fc Adapter.

A sample output from an FCoE configuration is shown in Figure 5.22.

Figure 5.22

Figure 5.22. List of runtime paths of FCoE-attached LUNs via CLI

The command used is the following:

esxcfg-mpath -b |grep -B1 "fcoe Adapter" |sed 's/Adapter.*//'

You may also use the verbose command:

esxcfg-mpath --list-paths |grep -B1 "fcoe Adapter" |sed 's/Adapter.*//'

Using the NAA ID for LUN 1, the list of pathnames is shown in Figure 5.23.

Figure 5.23

Figure 5.23. List of pathnames of an FCoE-attached LUN

You may also use the verbose version of the command shown in Figure 5.23 by using --device instead of -d.

This translates to the physical pathnames shown in Figure 5.24.

Figure 5.24

Figure 5.24. List of paths names of an FCoE LUN

The command used to collect the ouput shown in Figure 5.24 is

esxcli storage nmp path list -d 6006016033201c00a4313b63995be011 |grep fcoe

Using Table 2.1, “Identifying SP Port Association with Each SP,” in Chapter 2, you can translate the targets listed in the returned four paths as shown in Table 5.7.

Table 5.7. Translation of FCoE Targets

Runtime Name

Target WWPN

SP Port Association

vmhba34:C0:T1:L1

5006016141e0b7ec

SPA1

vmhba34:C0:T0:L1

5006016941e0b7ec

SPB1

vmhba33:C0:T1:L1

5006016041e0b7ec

SPA0

vmhba33:C0:T0:L1

5006016841e0b7ec

SPB0

Identifying Path States and on Which Path the I/O Is Sent—FC

Still following the process as you did with the FC example (refer to Figure 5.17), two fields are relevant to the task of identifying the path states and the I/O path: Group State and Path Selection Policy Path Config. Table 5.8 shows the values of these fields and their meaning.

Table 5.8. Interpreting Path States—FCoE

Runtime Name

Group State

PSP Path Config

Meaning

vmhba34:C0:T1:L1

Standby

non-current path; rank: 0

Passive SP—no I/O

vmhba34:C0:T0:L1

Active

current path; rank: 0

Active-SP—I/O

vmhba33:C0:T1:L1

Standby

non-current path; rank: 0

Passive SP—no I/O

vmhba33:C0:T0:L1

Active

non-current path; rank: 0

Active SP—no I/O

Combining the last two tables, we can extrapolate the following:

  • The LUN is currently “owned” by SPB (hence the state is Active).
  • The I/O to the LUN is sent via the path to SPB Port 1.
  • + Share This
  • 🔖 Save To Your Account