Scenario for finding available LUNs

SUSE Linux Enterprise Server 15 SP5 LPAR mode z/VM guest

There are several steps from setting an FCP device online to listing the available LUNs.

Before you begin

Alternatively to this procedure, you can use one of the following options to discover FCP devices, remote ports, and available LUNs:
  • The YaST GUI yast2 zfcp
  • The text-based interface yast zfcp
  • The command-line tool zfcp_san_disc (does not list FCP devices)
See the section about IBM Z® hard disk configuration in the SUSE Linux® Enterprise Server 15 SP5 Deployment Guide.

Procedure

  1. Check for available FCP devices of type 1732/03:
    # lscss -t 1732/03
    Device   Subchan.  DevType CU Type Use  PIM PAM POM  CHPIDs
    ----------------------------------------------------------------------
    0.0.3c02 0.0.0015  1732/03 1731/03      80  80  ff   36000000 00000000 
    Another possible type would be, for example, 1732/04.
  2. Set the FCP device online:
    # chccwdev 0.0.3c02 --online
    A port scan is performed automatically when the FCP device is set online.
  3. Optional: Confirm that the FCP device is available and online:
    # lszfcp -b 0.0.3c02 -a 
    0.0.3c02 host0
    Bus = "ccw"
        availability        = "good"
    ...
        failed              = "0"
    ...
        in_recovery         = "0"
    ...
        online              = "1"
    ...
    
  4. Optional: List the available ports:
    # lszfcp -P
    0.0.3c02/0x50050763030bc562 rport-0:0-0
    0.0.3c02/0x500507630310c562 rport-0:0-1
    0.0.3c02/0x500507630040727b rport-0:0-10
    0.0.3c02/0x500507630e060521 rport-0:0-11
    ...
  5. Scan for available LUNs on FCP device 0.0.3c02, port 0x50050763030bc562:
    # lsluns -c 0.0.3c02 -p 0x50050763030bc562
    Scanning for LUNs on adapter 0.0.3c02
            at port 0x50050763030bc562:
                    0x4010400000000000
                    0x4010400100000000
                    0x4010400200000000
                    0x4010400300000000
                    0x4010400400000000
                    0x4010400500000000
                    0x4010400600000000
                    ...