lslun

Lists the logical unit numbers (LUNs) that are accessible from SAN File System.

Read syntax diagramSkip visual syntax diagram
>>-lslun--+----------+--+-------------------------------+------->
          +- –?----+  |          .-default----------. |
          +- –h----+  '- –fmt--+-delim--character-+-'
          '- –help-'             '-xml--------------'

>--+----------------+--+------------------+--------------------->
   |        .-off-. |  |          .-on--. |
   '- –p--+-on--+-'  '- –hdr--+-off-+-'

>--+---------------+--+----------------+--+-------+------------->
   '- –r--number-'  |        .-off-. |  +- –l-+
                      '- –v--+-on--+-'  '- –s-'

>--+-------------------------+--+-------------------------+----->
   '- –client--client_name-'  '- –vendor--vendor_name-'

>--+---------------------------+--+----------------------+------>
   '- –product--product_name-'  '- –vol--volume_name-'

>--+--------------------------+--+------------+----------------><
   '- –state--+-assigned--+-'  | .--------. |
                +-available-+    | V        | |
                +-error-----+    +---lun_id-+-+
                +-unknown---+    '- – ------'
                '-unusable--'

Parameters

–? | –h | –help
Displays a detailed description of this command, including syntax, parameter descriptions, and examples. If you specify a help option, all other command options are ignored.
–fmt
Specifies the format of the output. You can specify one of the following values:
default
Specify this value to display output in a tabular format using spaces as the delimiter between the columns. This is the default value. For example:
OS Device Path   LUN ID   Engine WWN                Vendor  Product
===================================================================
/dev/sda              2   12:34:56:78:91:23:45:67   IBM     2105F20 

Size (MB)   Volume   State
=============================
    47000   Vol1     Assigned
delim character
Specify this value to display output in a tabular format using the specified character to separate the columns. If you use a shell metacharacter (for example, * or \t) as the delimiting character, enclose the character in single quotation marks (') or double quotation marks ("). A blank space is not a valid character. For example:
/dev/sda,2,12:34:56:78:91:23:45:67,IBM,2105F20,47000,Vol1,Assigned
xml
Specify this value to display output using XML format, for example:
<IRETURNVALUE>
<INSTANCE CLASSNAME="STC_AvailableLUNs">
<PROPERTY NAME="LUNID" TYPE="uint64"><VALUE TYPE="uint64">2</VALUE>
</PROPERTY>
<PROPERTY NAME="NodeWWN" TYPE="string"><VALUE TYPE="string">
12&58;34&58;56&58;78&58;91&58;23&58;45&58;67</VALUE></PROPERTY>
<PROPERTY NAME="Vendor" TYPE="string"><VALUE TYPE="string">IBM</VALUE>
</PROPERTY>
<PROPERTY NAME="Product" TYPE="string"><VALUE TYPE="string">2105F20
</VALUE></PROPERTY>
<PROPERTY NAME="Size" TYPE="uint64"><VALUE TYPE="uint64">47000</VALUE>
</PROPERTY>
<PROPERTY NAME="State" TYPE="uint64"><VALUE TYPE="uint64">2</VALUE>
</PROPERTY>
<PROPERTY NAME="VolumeName" TYPE="string"><VALUE TYPE="string"></VALUE>
</PROPERTY>
<PROPERTY NAME="DeviceID" TYPE="string"><VALUE TYPE="string">
&47;dev&47;sda</VALUE></PROPERTY>
</INSTANCE>
</IRETURNVALUE>
–p
Specifies whether to display one page of text at a time or all text at once.
off
Displays all text at one time. This is the default value when the sfscli command is run in single-shot mode.
on
Displays one page of text at time. Pressing any key displays the next page. This is the default value when the sfscli command is run in interactive mode.
–hdr
Specifies whether to display the table header.
on
Displays the table header. This is the default value.
off
Does not display the table header.
–r number
Specifies the number of rows per page to display when the –p parameter is on. The default is 24 rows. You can specify a value from 1 to 100.
–v
Specifies whether to enable verbose mode.
off
Disables verbose mode. This is the default value.
on
Enables verbose mode.
–l
Displays the LUN IDs and other information about the LUNs.
–s
Displays the LUNs by their LUN IDs.
–client client_name
Displays information for only those data LUs that are visible to the specified clients as specified by SAN zoning. Any client that is zoned similarly has access to the same LUs.

This parameter reports the state of the LUN as assigned, if there is a SAN File System disk label on the LUN. It also reports the volume name to which this LUN is assigned. However if there is a valid SAN File System disk label on the LUN but this label does not belong to the current cluster, a question mark (?) is returned for the volume name. This can happen either because the LUN belongs to another SAN File System cluster, or because the disk label corresponds to a previous installation that did not remove the label. In either case, if a volume needs to be created on the LUN, you can specify the –f parameter to force the volume creation.

–vendor vendor_name
Displays information for only those LUs that match the specified vendor name.
–product product_name
Displays information for only those LUs that match the specified product name.
–vol volume_name
Displays information for only those LUs that match the specified SAN File System volume name.
–state
Displays information for only those LUs that match the specified state. Possible states are:
assigned
Displays only those LUs that are assigned to a storage pool and usable.
available
Displays only those LUs that are visible to SAN File System and usable but are not assigned to a storage pool.
error
Displays only those LUs for which an error occurred while determining their availability.
unknown
Displays only those LUs whose availability could not be determined because the metadata server is not running.
unusable
Displays only those LUs that are unsuitable to be a volume. An LU is considered unsuitable if it is read-only, if its availability from all metadata servers in the cluster is inconsistent, or if the LU does not have an associated raw device.
lun_id
Specifies one or more identifiers of LUNs for which to display information.
Specifies that you want to read one or more LUNs from stdin (for example, – << /work/device_paths_list.txt).

Prerequisites

The cluster must not be in an offline state when you run this command.

Description

This command operates only against the local engine.

By default, this command lists the metadata LUNs.

If you do not specify any filtering parameters, this command lists all the LUNs that are accessible to SAN File System, including LUNs that have not been added to SAN File System, SAN File System volumes, and unusable LUNs.

This command displays the following default information for each LUN:
  • Logical unit number (LUN) identifier.
  • Vendor.
  • Product.
  • Size of the device, in MB.
  • Volume name, if the LUN is assigned in SAN File System.
  • State of the LU.

Example

Display LUNs The following example lists all the attributes of all the available LUNs:
sfscli> lslun -client client03
Lun ID                                      Vendor Product Size (MB) Volume State     
=====================================================================================
VPD83Type1=IBM     2105            2CF24903 IBM®    2105800      1907 -      Available 
VPD83Type1=IBM     2105            2CE24903 IBM    2105800      1907 -      Available 
VPD83Type1=IBM     2105            2CC24903 IBM    2105800      1907 -      Available 
VPD83Type1=IBM     2105            2CD24903 IBM    2105800      1907 -      Available 
VPD83Type1=IBM     2105            2CB24903 IBM    2105800      1907 -      Available 
VPD83Type1=IBM     2105            2CA24903 IBM    2105800      1907 -      Available 
VPD83Type1=IBM     2105            2C924903 IBM    2105800      1907 -      Available 
VPD83Type1=IBM     2105            2BD24903 IBM    2105800      4768 MASTER Assigned  
VPD83Type1=IBM     2105            3B624903 IBM    2105800      4768 -      Available 
VPD83Type1=IBM     2105            3B524903 IBM    2105800      4768 -      Available 
VPD83Type1=IBM     2105            2D324903 IBM    2105800      1907 -      Available 

Parent topic: Administrative commands

Related reference
activatevol
chvol
expandvol
lsvol
mkvol
rediscoverluns
reportvolfiles
rmvol
suspendvol

Terms of use | Feedback
(C) Copyright IBM Corporation 2003, 2004. All Rights Reserved.