LSLUNS(8) | System Manager's Manual | LSLUNS(8) |
NAME¶
lsluns - list LUNs discovered in the FC SAN through zfcp, or show encryption state of zfcp-attached LUNs
SYNOPSIS¶
lsluns [-c busid] ... [-p
wwpn] ...
lsluns -a [-c busid] ... [-p
wwpn] ...
lsluns [-h] [-v]
DESCRIPTION¶
This tool is designed for environments with SCSI devices attached through the zfcp device driver.
lsluns lists all logical unit numbers (LUNs) discovered in the Fibre Channel (FC) Storage Area Network (SAN). This causes extra SAN traffic for each target port WWPN.
lsluns -a shows the encryption state of the attached LUNs. This causes extra SAN traffic for each attached LUN.
Limit the listing by specifying one or more adapters (FCP device bus-IDs) or target port WWPNs or both.
For all other uses, such as listing attached LUNs or properties other than encryption, use other tools such as lszfcp -D or lsscsi -tv or lszdev zfcp-lun -ii.
Details on lsluns without -a option¶
- Prerequisite
- Discovering LUNs only makes sense for NPIV-enabled FCP devices without
zfcp automatic LUN scan. zfcp automatic LUN scan is available as of kernel
version 2.6.37, if not disabled with zfcp.allow_lun_scan=0.
With available and enabled zfcp automatic LUN scan, the kernel already performs LUN discovery.
- Temporary LUN Attachment
- If not attached already, lsluns temporarily attaches LUN 0 (or if this fails the WLUN 0xc101000000000000) during runtime. Do not terminate lsluns with a signal. Signals interfere with the removal of temporarily attached LUNs.
- Storage Products
- Some storage products return a peripheral device type of 31==0x1f with peripheral qualifier 0 in a SCSI standard INQUIRY command for an unmapped FCP LUN 0. Examples are: IBM Storwize products, including IBM V7000, IBM V840, IBM V9000, and IBM SAN Volume Controller. For lsluns to work with such storage products, you must have a host mapping on the storage, which maps some volume to exported FCP LUN 0x0000000000000000 (Storwize host map property "SCSI ID" 0) for each used FCP-device initiator WWPN. The volume can be a minimum-sized thin-provisioned shared stand-in volume.
OPTIONS¶
- -a, --active
- Show the encryption state of the attached LUNs. Encrypted devices are indicated with a bracketed X immediately following the LUN number.
- -c busid, --ccw=busid
- Filter LUNs by adapter with the specified FCP device bus-ID. This option can be specified multiple times. When used in conjunction with -p, only those LUNs are listed that also satisfy at least one of the -p constraints.
- -p wwpn, --port=wwpn
- Filter LUNs by target port with the specified WWPN. This option can be specified multiple times. When used in conjunction with -c, only those LUNs are listed that also satisfy at least one of the -c constraints.
- -h, --help
- Print help message and exit.
- -v, --version
- Display version information and exit.
EXAMPLES¶
- lsluns -c 0.0.3922
- Lists all LUNs discovered in the FC SAN on adapter 0.0.3922.
- lsluns -p 0x5005123456789000
- Lists all LUNs discovered in the FC SAN on target port 0x5005123456789000.
- lsluns -c 0.0.3922 -c 0.0.fc00 -p 0x5005123456789000 -p 0x5005abcdefabc000
- Lists all LUNs discovered in the FC SAN on: adpater 0.0.3922 and port 0x5005123456789000, adapter 0.0.3922 and port 0x5005abcdefabc000, adapter 0.0.fc00 and port 0x5005123456789000, or adapter 0.0.fc00 and port 0x5005abcdefabc000.
- lsluns -a
- adapter = 0.0.3c02
port = 0x500507630300c562
lun = 0x401040a200000000(X) /dev/sg0 Disk IBM:2107900
lun = 0x401040a300000000 /dev/sg1 Disk IBM:2107900Shows the encryption status of attached LUNs. A bracketed X suffixed to a LUN indicates that the device is encrypted.
SEE ALSO¶
2017-02-17 | s390-tools |