lsmap command

Purpose

Displays the mapping between physical, logical, and virtual devices.

Syntax

lsmap { -vadapter ServerVirtualAdapter | -plc PhysicalLocationCode | -all } [ -type BackingDeviceType | -npiv | -vnic ] [ -dec ] [ -label ] [ -cpid clientPartitionIdDecimal ] [ -field FieldName ... ] [ -fmt Delimiter | -fmt2 Delimiter ]

lsmap { -vadapter ServerVirtualAdapter | -plc PhysicalLocationCode | -all } [ -type BackingDeviceType | -net ] [ -dec ] [ -label ] [ -field FieldName ... ] [ -fmt Delimiter | -fmt2 Delimiter ]

lsmap -ams { -vtd PagingDevice | -all } [ -type BackingDeviceType ] [ -dec ] [ -field FieldName ... ] [ -fmt Delimiter | -fmt2 Delimiter ]

lsmap -clustername ClusterName { -all | -hostname HostName } [ -dec ] [ -field FieldName... ] [ -fmt Delimiter | -fmt2 Delimiter ]

lsmap -suspend { -vadapter ServerVirtualAdapter | -all } [ -type BackingDeviceType ] [-dec ] [ -field FieldName ... ] [ -fmt Delimiter | -fmt2 Delimiter ]

Description

The lsmap command displays the mapping between the virtual host adapters and the physical devices they are backed to. Given an adapter name (ServerVirtualAdapter) or physical location code (PhysicalLocationCode) of a server virtual adapter, the device name of each connected virtual target device (child devices), its logical unit number, one or more backing devices, and the backing devices physical location code is displayed. If the -net flag is specified the supplied device must be a virtual server Ethernet adapter.

The -fmt flag separates the output by a user-specified delimiter. The delimiter can be any non-white space character. A single space is displayed in the output to indicate an empty field.

The -fmt2 flag is similar to the -fmt flag, in that it separates the output by a user-specified delimiter. The valid delimiters are [! @ # % , :]. No character is displayed in the output for an empty field.

The -type flag limits the types of backing devices that are displayed to the user-specified list, BackingDeviceType. Except for the net type, any combination of device types might be specified. The net type cannot be combined with any other type.

The -npiv flag displays the server binding information between the virtual Fibre Channel and the physical Fibre Channel adapter. It is also used to display client adapter attributes that are sent to the server adapter.

The -suspend flag displays the storage that is used by a suspended client. The rmdev command can be used to remove suspended adapters. For more information, see the Examples section of the rmdev command topic.

When you list the mappings of a particular vhost/vfchost adapter, the information is displayed in two groups. One group displays details about the adapter (Name of the Server Virtual SCSI Adapter (SVSA), Adapter's physical location, Client Partition ID), while the second group displays details about Virtual Target Devices (VTDs) (VTD's name, Status, LUN, Backing device, Backing device's Physloc, Mirrored state). The output contains one instance of the first group and multiple instances of the second group, depending on the number of VTDs. You can pass these fields in any order. However, the lsmap command always displays values from the first group, followed by the values from the second group. Within a group, fields that are displayed in the output are in the same order as the input (For more details, see examples for reordering attributes).

In VIOS, if the host adapter is configured to connect to any client partition and the client that is connecting to this host adapter is down, the host adapter mapping displays the Client partition ID as 0x00000000.

Flags

Flag name Description
-all Specifies that the mapping information must be displayed for all the virtual SCSI devices. If the -all flag is used with the -net flag, virtual Ethernet adapters are displayed. If the flag is used with the -npiv flag, virtual Fibre Channel adapters are displayed. If the flag is used with the -suspend flag, suspended virtual small computer system interface (VSCSI) adapters are displayed.
-ams Displays paging space device information that is used in active memory sharing.
-clustername Specifies the cluster name.
-cpid Displays the mapping between physical, logical, and virtual devices, for the specific client partition ID, in decimal. This flag must be used along with the -all, -npiv, or -vnic flag.
-dec Displays the client partition ID, in decimal.
-label Displays the user-defined label of the virtual adapter.
-field FieldName Specifies the list of fields to display.
Note: The order that you specify the attributes is not assured to be the same order as they are returned.
For virtual SCSI (default), the following fields are supported:
svsa
Server virtual adapter name.
physloc
The physical location code of the server's virtual adapter.
mirrored
The backing device is part of a Peer-to-Peer Remote Copy (PPRC) pair.
clientid
Client partition ID.
vtd
Virtual target device.
lun
Logical unit number.
backing
Backing device.
bdphysloc
The physical location code of the backing device.
status
Virtual target device status.
For shared Ethernet adapter (-net flag), the following fields are supported:
svea
Virtual Ethernet adapter name.
physloc
The physical location code of the server virtual adapter.
sea
Shared Ethernet adapter.
backing
Backing device.
bdphysloc
The physical location code of the backing device.
status
Status of the Backing device (real adapter) that is used while creating a SEA.
 

For NPIV (-npiv flag), the following fields are supported:

name
Virtual Fibre Channel adapter name.
physloc
The physical location code of the server virtual Fibre Channel adapter.
clntid
Client logical partition ID.
clntname
Client logical partition name.
clntos
The operating system on the client logical partition.
status
Virtual Fibre Channel adapter status.
fc
Physical Fibre Channel adapter name.
fcphysloc
The physical location of the Fibre Channel adapter.
ports
Physical Fibre Channel port number.
flags
Virtual Fibre Channel adapter flags.
vfcclient
Client virtual Fibre Channel adapter name.
vfcclientdrc
Client virtual Fibre Channel adapter used for Dynamic Reconfiguration Connection (DRC).
  
For active memory sharing (-ams flag), the following fields are supported:
paging
Paging virtual target device.
streamid
Stream ID.
clientid
Client logical partition ID.
status
Paging virtual target device status.
redundancy
Redundancy usage for the paging VIOS logical partitions.
backing
Backing device.
poolid
Memory pool ID.
vasi
Virtual Asynchronous Services Interface (VASI) device name.
pager
Pager device name.
vbsd
Virtual Block Storage Device (VBSD) name.
For suspended adapter (-suspend flag), the following fields are supported:
svsa
Suspended virtual adapter.
state
Suspended virtual adapter state.
clientname
Client name.
streamid
Stream ID.
clientid
Client partition ID.
vtd
Virtual target device.
status
Virtual target device status.
lun
Logical unit number.
backing
Backing device.
bdphysloc
The physical location code of the backing device.
mirrored
The backing device is part of a Peer-to-Peer Remote Copy (PPRC) pair.

For cluster (-clustername flag), the following fields are supported:

 
Physloc
The physical location code of the server virtual adapter.
ClientID
Client partition ID.
VTD
Client partition ID.
LUN
Logical unit number.
Backing
Backing device.
-fmt delimiter Specifies a delimiter to separate output fields. A single space is displayed in the output to indicate an empty field.
-fmt2 delimiter Specifies a delimiter to separate output fields. No character is displayed to indicate an empty field.
-hostname Specifies the host name or IP address of the VIOS partition.
-net Specifies the supplied device is a server virtual Ethernet adapter or if used with the -all flag all virtual Ethernet adapters and backing devices are displayed.
-npiv Displays NPIV binding information.
-plc PhysicalLocatoinCode Specifies the device physical location code of a server virtual adapter. This flag cannot be used with the -vadapter flag.
-sp Specifies the storage pool name.
-suspend Displays suspended virtual adapters.
-type Specifies the type of devices to display. The following fields are supported:
disk
List physical backing devices.
lv
List logical volume backing devices.
optical
List optical backing devices.
tape
List tape backed devices.
file
List file backed devices.
file_disk
List file backed disk devices.
file_opt
List file backed optical devices.
cl_disk
List clustered backing devices.
net
List network devices. (This option cannot be used in combination with disk, lv, or optical)
usb_disk
Lists USB disks

-vadapter VirtualServerAdapter

Specifies the device name of a server virtual adapter. This flag cannot be used with the -plc flag.

-vtd PagingDevice

Specifies the active memory sharing (AMS) paging device to be displayed.

Output Field Definitions

Field Description
SVSA Server Virtual SCSI Adapter
Physloc Physical Location Code
VTD Virtual Target Device
LUN Logical Unit Number
SVEA Server Virtual Ethernet Adapter
SEA Shared Ethernet Adapter

Exit Status

Return code Description
12 No SEAs associated with device
15 Specified device is not a server virtual SCSI adapter
16 Specified device is not a server virtual Ethernet adapter
17 Specified device in not in the AVAILABLE state
63 Specified device is not a virtual Fibre Channel adapter on a server logical partition.

Examples

  1. To list all virtual target devices and backing devices that are mapped to the server virtual SCSI adapter vhost2, type the following command:
    lsmap -vadapter vhost2 

    The system displays the following message:

     SVSA                 Physloc				Client Partition ID
    -------------        --------------------------------- -----------------------------
    vhost2       	      U9111.520.10004BA-V1-C2           0x00000004
    
    VTD                   vtscsi0
    Status                Available
    LUN                   0x8100000000000000
    Backing device        vtd0-1
    Physloc
    
    VTD                   vtscsi1
    LUN                   0x8200000000000000
    Backing device        vtd0-2
    Physloc
    
    VTD                   vtscsi2
    Status                Available
    LUN                   0x8300000000000000
    Backing device        hdisk2
    Physloc               U787A.001.0397658-P1-T16-L5-L0
    Mirrored              false
  2. To list the shared Ethernet adapter and backing device mapped to the virtual server Ethernet adapter ent4, type the following command:
    lsmap -vadapter ent4 -net

    The system displays the following message:

    SVEA   		           Physloc
    ------		           ---------------------
    ent4   		           P2-I1/E1
    
    SEA                  ent5
    Backing device       ent1
    Status               Available
    Physloc              P2-I4/E1
  3. To list the NPIV mapping information separated by a : (colon), by using the -fmt flag, type the following command:
    lsmap -all -npiv -fmt :

    The system displays the following message:

    vfchost0:U9117.MMD.10581C7-V31-C4:37: : :NOT_LOGGED_IN: : :0:1: :
  4. To list the NPIV mapping information separated by a : (colon), by using the -fmt2 flag, type the following command:
    lsmap -all -npiv -fmt2 :

    The system displays the following message:

    vfchost0:U9117.MMD.10581C7-V31-C4:37:::NOT_LOGGED_IN:::0:1::
  5. To list the shared Ethernet adapter and backing device mapped to the virtual server Ethernet adapter ent3 in script format separated by a : (colon), type the following command:
    lsmap -vadapter ent3 -net -fmt ":"

    The system displays the following message:

    ent3:U8204.E8A.06A85B2-V13-C11-T1:ent10:ent1:Available:U7311.D20.06168AC-P1-C06-T1
  6. To list all virtual target devices and backing devices, where the backing devices are of type disk or lv, type the following command:
    lsmap -all -type disk lv

    The system displays the following message:

     SVSA                Physloc                           Client Partition ID
    -------------        --------------------------------- -----------------------------
    vhost0               U9117.570.10D1B0E-V4-C3           0x00000000
    
    VTD                   vtscsi0
    Status                Available
    LUN                   0x8100000000000000
    Backing device        hdisk0
    Physloc               U7879.001.DQD0KN7-P1-T12-L3-L0
    
    VTD                   vtscsi2
    Status                Available
    LUN                   0x8200000000000000
    Backing device        lv04
    Physloc                
    
     SVSA                Physloc                           Client Partition ID
    -------------        --------------------------------- -----------------------------
    vhost1               U9117.570.10D1B0E-V4-C4           0x00000000
    
    VTD                   vtscsi1
    Status                Available
    LUN                   0x8100000000000000
    Backing device        lv03
    Physloc 
  7. To list NPIV mapping information, type the following command:
    lsmap -all -npiv

    The system displays the following message:

    Name           Physloc                   ClntID ClntName  ClntOS
    ======       ======================      ===== ========== =====
    vfchost0       U8203.E4A.HV40026-V1-C12    1    HV-40026    AIX
    
    Status:NOT_LOGGED_IN
    FC name:fcs0                             FC loc code:U789C.001.0607088-P1-C5-T1
    Ports logged in:3
    Flags:1 <not_mapped, not_connected>
    VFC client name:                VFC client DRC:
  8. To list shared storage pool mappings along with other storage mappings for a particular virtual SCSI adapter, type the following command:
    lsmap -vadapter vhost0
    The system displays the following output:
     SVSA                 Physloc                          Client Partition ID
    -------------        --------------------------------- -----------------------------
    vhost0       	      U8233.E8B.HV32001-V2-C2            0x00000000
    VTD                   vtscsi0	 
    Status                Available	 
    LUN                   0x8100000000000000	 
    Backing device        testLU1.b1277fffdd5f38acb365413b55e51638	 
    Physloc	 	 
    Mirrored              N/A	 
    
    VTD                   vtscsi1	 
    Status                Available	 
    LUN                   0x8200000000000000	 
    Backing device        testLU2.8f5a2c27dce01bf443383a01c7f723d0	 
    Physloc	 	 
    Mirrored              N/A	 
    
    VTD                   vtscsi2	 
    Status                Available	 
    LUN                   0x8300000000000000	 
    Backing device        testLU3.2cc8eadef6df0db3da76e21c79c7377f	 
    Physloc	 	 
    Mirrored              N/A	
    
    VTD                   vtscsi3
    Status                Available
    LUN                   0x8400000000000000
    Backing device        hdisk3
    Physloc               U787A.001.0397658-P1-T16-L5-L0
    Mirrored              false
    
    VTD                   vtscsi4
    Status                Available
    LUN                   0x8500000000000000
    Backing device        data_lv
    Physloc               
    Mirrored              N/A
  9. To list all shared storage pool mappings, type the following command.
    lsmap -all -clustername newcluster
    The system displays the following output:
    Physloc                                                       Client Partition ID
    -----------------------------------------------------------------   -------------------------
    U8233.E8B.HV32001-V2-C2                                             0x00000000
    VTD                  vtscsi0
    LUN                  0x8100000000000000
    Backing device       testLU1.b1277fffdd5f38acb365413b55e51638
    
    Physloc                                                       Client Partition ID
    -----------------------------------------------------------------   -------------------------
    U8233.E8B.HV32001-V2-C2                                             0x00000000
    VTD                  vtscsi1
    LUN                  0x8200000000000000
    Backing device       testLU2.8f5a2c27dce01bf443383a01c7f723d0
    
    Physloc                                                       Client Partition ID
    -----------------------------------------------------------------   -------------------------
    U8233.E8B.HV32001-V2-C2                                             0x00000000
    VTD                  vtscsi2
    LUN                  0x8300000000000000
    Backing device       testLU3.2cc8eadef6df0db3da76e21c79c7377f
    
    Physloc                                                       Client Partition ID
    -----------------------------------------------------------------   -------------------------
    U9179.MHB.10A9DAP-V4-C111                                           0x00000000
    VTD                  vtscsi0
    LUN                  0x8100000000000000
    Backing device       testLU4.ad089db46c2dc3769e71bf7875607c6f
    
    Physloc                                                       Client Partition ID
    -----------------------------------------------------------------   -------------------------
    U9179.MHB.10A9DAP-V1-C31                                            0x00000015
    VTD                  vtscsi0
    LUN                  0x8200000000000000
    Backing device       testLU5.34cd008de649b8fde83bb16d395d48c9
    
    Physloc                                                       Client Partition ID
    -----------------------------------------------------------------   -------------------------
    U9179.MHB.10A9DAP-V3-C111                                           0x00000065
    VTD                  vtscsi0
    LUN                  0x8200000000000000
    Backing device       testLU6.ad089db46c2dc3769e71bf7875607c6f
  10. To list all suspended adapters, type the following command:
    lsmap -all -suspend 
    The system displays the following output:
    SVSA       State       Client Name             Stream ID              Client Partition ID
    -------------------------------------------------------------------------------------------
    susadpt0      suspended	   17*9117-MMB*10002EP     0xf70e4facfc46e9a0     0x00000017  
    
    VTD                  vtscsi0
    Status               Defined
    LUN                  0xx8100000000000000
    Backing device       hdisk5
    Physloc              U789D.001.DQDWAXR-P1-C4-T1-W205600A0B86E4A5A-L5000000000000
    Mirrored             false
    
    VTD                  vtscsi1
    Status               Defined
    LUN                  0x8200000000000000
    Backing device       hdisk6
    Physloc              U789D.001.DQDWAXR-P1-C4-T1-W205600A0B86E4A5A-L6000000000000
    Mirrored             false                                                                  
  11. To reorder attributes to list SVSA, VTD, Physloc, and LUN (where, all the attributes are a mix of the values in the adapter and VTD group), type the following command:
    lsmap -all -fmt , -field SVSA VTD Physloc LUN

    The system displays the following message:

    vhost0,U9117.MMD.10581C7-V34-C5,vtscsi0,0x8100000000000000,vtscsi1,0x8200000000000000,vtscsi2,0x8300000000000000
                vhost1,U9117.MMD.10581C7-V34-C6,vtscsi4,0x8200000000000000,vtscsi5,0x8300000000000000
    Note: The order in which the values are displayed in the output is: SVSA, Physloc, VTD, and LUN.
  12. To reorder attributes to list Physloc, LUN, VTD, SVSA (where, all the attributes are a mix of the values in the adapter and VTD group), type the following command:
    lsmap -all -fmt , -field SVSA VTD Physloc LUN

    The system displays the following message:

    U9117.MMD.10581C7-V34-C5,vhost0,0x8100000000000000,vtscsi0,0x8200000000000000,vtscsi1,0x8300000000000000,vtscsi2
                U9117.MMD.10581C7-V34-C6,vhost1,0x8200000000000000,vtscsi4,0x8300000000000000,vtscsi5
    Note: The order in which the values are displayed in the output is: Physloc, SVSA, Physloc, LUN, and VTD.
  13. To display the client partition ID, in decimal, when displaying all the virtual SCSI device mapping information, type the following command:
    lsmap -all -dec

    The system displays the following message:

    SVSA                    Physloc                         Client Partition ID
    --------------- -------------------------------------------- ------------------
    vhost0                 U9117.MMD.10581C7-V18-C2                        81
    
    VTD vtscsi0
    Status Available
    LUN 0x8100000000000000
    Backing device hdisk42
    Physloc U5877.001.RCH019B-P1-C4-T1-W500507680215E8D1-L2A000000000000
    Mirrored false
    
    SVSA                         Physloc                          Client Partition ID
    --------------- -------------------------------------------- ------------------
    vhost1                      U9117.MMD.10581C7-V18-C3                     0
    
    VTD vtscsi1
    Status Available
    LUN 0x8100000000000000
    Backing device hdisk75
    Physloc U5877.001.RCH019B-P1-C4-T1-W500507680215E8D1-L4B000000000000
    Mirrored false
  14. To display all the virtual SCSI device mapping information for a client with partition ID 81 (this number must be a decimal value), type the following command:
    lsmap -vadapter vhost0 -dec -cpid 81

    The system displays the following message:

    SVSA                         Physloc                        Client Partition ID
    --------------- -------------------------------------------- ------------------
    vhost0                         U9117.MMD.10581C7-V18-C2          81
    
    VTD vtscsi0
    Status Available
    LUN 0x8100000000000000
    Backing device hdisk42
    Physloc U5877.001.RCH019B-P1-C4-T1-W500507680215E8D1-L2A000000000000
    Mirrored false

    This flag can also be used to display NPIV and vNIC binding information.

  15. To display the label information of all virtual adapters of the server, type the following command:
    $ lsmap -all -label

    The system displays the following message:

    SVSA            Physloc                                      Client
    Partition ID
    --------------- --------------------------------------------
    ------------------
    vhost0          U9040.MR9.132944X-V6-C104
    0x00000009
    Label                 my_new_label
    VTD                   vtscsi0
    Status                Available
    LUN                   0x8100000000000000
    Backing device        hdisk1
    Physloc
    Mirrored              N/A
  16. To display the label information of the NPIV, type the following command:
    $ lsmap -all -npiv -label

    The system displays the following message:

    Name          Physloc                            ClntID ClntName
    ClntOS
    ------------- ---------------------------------- ------ --------------
    -------
    vfchost0      U9040.MR9.132944X-V6-C304               9 veena_4375
    AIX
    Label: my_new_label
    Status:LOGGED_IN
    FC name:fcs0                    FC loc code:U78D4.ND1.2823940-P1-C2-T1
    Ports logged in:3
    Flags:a<LOGGED_IN,STRIP_MERGE>
    VFC client name:fcs0            VFC client DRC:U9040.MR9.132944X-V9-
    C304