subscribe iconSubscribe to this information

lsmap command

Purpose

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

Syntax

lsmap { -vadapter ServerVirtualAdapter | -plc PhysicalLocationCode | -all } [ -type BackingDeviceType | -net | -npiv] [ -field FieldNames ] [ -fmt Delimiter ]

lsmap -ams { -vtd PagingDevice | -all } [ -type BackingDeviceType ] [ -field FieldNames ] [ -fmt Delimiter ]

Description

The lsmap command displays the mapping between 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, backing device(s) 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 divides the output by a user-specified delimiter/character (delimiter). The delimiter can be any non-white space character. This format is provided to facilitate scripting.

The -type flag limits the types of backing devices displayed to the user-specified list, BackingDeviceType. With the exception of the net type, any combination of device types may be specified. The net type cannot be combined with any other type.

The -npiv flag is used to display 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 being sent to the server adapter.

Flags

-all Specifies the lsmap output that should be displayed for all virtual SCSI devices. If used with the -net flag, virtual Ethernet adapters are displayed. If used with the -npiv flag, virtual fibre channel adapters are displayed.
-ams Displays paging space device information used in active memory sharing.
-field FieldName Specifies the list of fields to display.
Note: The order that you specify the attributes is not guaranteed to be the same order as they are returned.
For virtual SCSI (default), the following fields are supported:
svsa
Server virtual adapter.
physloc
The physical location code of the server virtual adapter.
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.
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
Shared Ethernet adapter status.
 

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.
-fmt delimiter Specifies a delimiter character to separate output fields.
-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.
-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.
net
List network devices. (This option cannot be used in combination with disk, lv, or optical)
-vadapter VirtualServerAdapter Specifies the device name of a server virtual adapter. This flag cannot be used with the -plc flag.
-vtd PagingDevice  

Output Field Definitions

Field Description
SVSA Server Virtual SCSI Adaper
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
11 No VTDs associated with device
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 mapped to the server virtual SCSI adapter vnode2, type:
    lsmap -vadapter vhost2 
    The system displays a message similar to the following:
     SVSA        Physloc                                     Client Partition ID
    ------------ -------------------------------------------- ------------------
    vhost0       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
  2. To list the shared Ethernet adapter and backing device mapped to the virtual server Ethernet adapter ent4, type:
    lsmap -vadapter
    ent4 -net
    The system displays a message similar to the following:
    SVEA  
    Physloc
    ------ --------------------------------------------
    ent4   P2-I1/E1
    
    SEA                   ent5
    Backing device        ent1
    Status                Available
    Physloc               P2-I4/E1
  3. To list the shared Ethernet adapter and backing device mapped to the virtual server Ethernet adapter ent5 in script format separated by a : (colon), type:
    lsmap -vadapter ent5 -fmt ":"
    The system displays a message similar to the following:
    ent5:ent8:ent2
  4. To list all virtual target devices and backing devices, where the backing devices are of type disk or lv, type:
    lsmap -all -type disk lv
    The system displays a message similar to the following:
    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 
  5. To list NPIV mapping information, type:
    lsmap -all -npiv
    The system displays a message similar to the following:
    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:

Send feedback | Rate this page

Last updated: Fri, Oct 30, 2009