LSLUNS(8)

πŸ“¦ version 2.44.1, in opensuse-leap 16.0

πŸ’– LSLUNS(8) β€” lsluns πŸ’–

okay bestie, welcome to the lsluns era πŸ’… this is manual page LSLUNS(8), and she's all about listing LUNs discovered in the FC SAN through zfcp, or showing the encryption state of zfcp-attached LUNs. no cap, it's giving storage-gremlin main character energy πŸ¦‹

πŸ“› 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 πŸ¦‹

okay so this tool is literally 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). Heads up: 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. πŸ’…

You can 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. iykyk 🧚

🧚 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. periodt ⭐

πŸŽ€ 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. lowkey iconic πŸŽ€

✨ 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 β€” Lists all LUNs discovered in the FC SAN.
  • 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.
  • the combo filter slay:
lsluns -c 0.0.3922 -c 0.0.fc00 -p 0x5005123456789000 -p
       0x5005abcdefabc000

Lists all LUNs discovered in the FC SAN on: adapter 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. no cap, that's the whole grid 🧚

  • lsluns -a β€” here's the encryption-state reveal:
adapter = 0.0.3c02
        port = 0x500507630300c562
                lun = 0x401040a200000000(X)     /dev/sg0
        Disk    IBM:2107900
                lun = 0x401040a300000000        /dev/sg1
        Disk    IBM:2107900

Shows the encryption status of attached LUNs. A bracketed X suffixed to a LUN indicates that the device is encrypted. πŸ’…

🫢 SEE ALSO 🫢

lszfcp(8), lsscsi(8), lszdev(8)

<rainbow>s390-tools β€’ 2017-02-17 β€’ LSLUNS(8)</rainbow> β€” that's the footer, bestie, and we're obsessed πŸ’…βœ¨

πŸ“¦ where this page comes from