mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
94b7a8f68d
Since zfcp lazily allocates Scsi_Host et al. on setting an FCP device
online for the first time since the last driver core bind to zfcp
(such as zfcp kernel module load),
lszfcp has only been showing FCP devices (vHBAs) that have been online
at least once including those that have been set offline again.
This is somewhat confusing.
Also it would be nice if lszfcp could be an easier to type replacement for
"lscss -t 17032/03" to simply show all devices bound to the zfcp device
driver.
Of course those FCP devices that have never been online, won't have any
zfcp-specific attribute details, only CIO attributes from the CCW bus.
They also do not have a Scsi_Host nor fc_host.
In order not to break any scripting or expectations around lszfcp,
make the new feature depend on the extended output command line option.
Example:
$ lszfcp -He
0.0.1880 - offline
$ lszfcp -HeV
/sys/devices/css0/0.0.010b/0.0.1880 offline
-
-
$ lszfcp -Hea
0.0.1880 - offline
Bus = "ccw"
availability = "good"
cmb_enable = "0"
cutype = "1731/03"
devtype = "1732/03"
modalias = "ccw:t1731m03dt1732dm03"
online = "0"
uevent = "DRIVER=zfcp"
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Fedor Loshakov <loshakov@linux.ibm.com>
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
131 lines
4.2 KiB
Plaintext
131 lines
4.2 KiB
Plaintext
.\" Copyright IBM Corp. 2006, 2019
|
|
.\" s390-tools is free software; you can redistribute it and/or modify
|
|
.\" it under the terms of the MIT license. See LICENSE for details.
|
|
.\"
|
|
.TH LSZFCP 8 "Feb 2019" "s390-tools"
|
|
.SH NAME
|
|
lszfcp \- list information about zfcp adapters, ports, and units
|
|
|
|
.SH SYNOPSIS
|
|
.B lszfcp
|
|
.RB [ \-hvVaHDPe ]
|
|
.RB [ \-b
|
|
.IR busid ]
|
|
.RB [ \-l
|
|
.IR lun ]
|
|
.RB [ \-p
|
|
.IR wwpn ]
|
|
.RB [ \-s
|
|
.IR /path/to/sys ]
|
|
|
|
.SH DESCRIPTION
|
|
.PP
|
|
.B lszfcp
|
|
provides information contained in sysfs about zfcp adapters, ports and
|
|
units and its associated scsi_hosts, fc_hosts, fc_remote_ports and
|
|
scsi_devices.
|
|
|
|
The default is to list busids of all zfcp adapters and their corresponding
|
|
SCSI host names.
|
|
|
|
There are three output variants. Default (without options "-a" or
|
|
"-V") is one line for each object. For adapters the busid and their
|
|
corresponding SCSI host names are listed. For ports the pair
|
|
"busid"/"wwpn" and their corresponding FC-remote-port names are listed.
|
|
For units the triple "busid"/"wwpn"/"lun" and their corresponding SCSI
|
|
device names are listed.
|
|
|
|
Option "-V" additionally shows the sysfs paths of interest for the
|
|
listed object.
|
|
If a SCSI device has an associated block device (disk)
|
|
and SCSI generic (sg) device, show their sysfs paths in a 3rd line.
|
|
|
|
Option "-a" additionally shows all attributes of interest found in
|
|
sysfs for the listed object.
|
|
|
|
Option "-e" enables an extended output format.
|
|
It enumerates all hosts/ports/luns independent of their state.
|
|
It also produces some improved error messages.
|
|
The extended output format can help determining problems.
|
|
Since a long time, without option "-e", lszfcp has
|
|
.I
|
|
not
|
|
enumerated:
|
|
hosts that have never been online (since last bind to zfcp device driver),
|
|
hosts that are defunct (CHPID configured off, or z/VM detach),
|
|
ports with fc_rport port_state unequal to "Online" (such as fibres pulled).
|
|
|
|
.SH OPTIONS
|
|
.TP
|
|
.B -a, --attributes
|
|
Show all attributes of the specified objects.
|
|
.TP
|
|
.B -D, --devices
|
|
List zfcp units and SCSI devices.
|
|
.TP
|
|
.B -H, --hosts
|
|
List zfcp adapters, fc-hosts, and scsi-hosts (default).
|
|
Without option "-e", information is given only
|
|
for adapters that are online (registered at the SCSI stack).
|
|
.TP
|
|
.B -P, --ports
|
|
List zfcp ports and FC remote ports.
|
|
.TP
|
|
.B -b busid, --busid busid
|
|
Show zfcp adapter, fc-host selected by busid.
|
|
.TP
|
|
.B -l lun, --lun lun
|
|
List zfcp unit(s) and SCSI device(s) selected by lun. (Information for
|
|
several units might be shown if devices with equivalent LUNs are
|
|
configured for different adapters or ports.)
|
|
.TP
|
|
.B -p wwpn, --wwpn wwpn
|
|
List zfcp port(s) and FC remote port(s) selected by wwpn. (Information
|
|
for several ports might be shown if a remote port is configured for
|
|
different adapters.)
|
|
.TP
|
|
.B -e, --extended
|
|
Generate extended output.
|
|
.TP
|
|
.B -V, --verbose
|
|
Generate verbose output. Display sysfs path names of class and bus
|
|
devices that are of interest for this object.
|
|
If a SCSI device has an associated block device (disk)
|
|
and SCSI generic (sg) device, show their sysfs paths in a 3rd line.
|
|
.TP
|
|
.B -s, --sysfs /path/to/sys
|
|
Use path as sysfs (for dbginfo archives).
|
|
.TP
|
|
.B -h, --help
|
|
Print help message and exit.
|
|
.TP
|
|
.B -v, --version
|
|
Display version info and exit.
|
|
|
|
.SH NOTE
|
|
.PP
|
|
Options "-b", "-p" or "-l" are of restricting nature. They limit the output
|
|
to those adapters, ports or units that match the specified busid, wwpn and lun.
|
|
If none of the options "-H", "-P" and "-D" are specified, "-b" implies "-H",
|
|
"-p" implies "-P" and "-l" implies "-D".
|
|
|
|
.SH EXAMPLES
|
|
.PP
|
|
.IP "lszfcp -P -H -D -V"
|
|
Show all device paths of all zfcp adapters, ports, units and its
|
|
associated SCSI devices, SCSI hosts, FC hosts and FC remote ports
|
|
.PP
|
|
.IP "lszfcp -b 0.0.0815 -a"
|
|
Show all attributes of ccw_device, scsi_host and fc_host which belong
|
|
to the adapter with busid "0.0.0815".
|
|
.IP "lszfcp -D -b 0.0.0815 -p 0x5005123456789000 -l 0x0000000000000000"
|
|
Show the device which matches the given busid, wwpn and lun.
|
|
.IP "lszfcp -b 0.0.0815 -p 0x5005123456789000 -l 0x0000000000000000"
|
|
Show all adapters that match the given busid, all ports that match the given
|
|
busid and wwpnn and show all units that match the given busid, wwpn and lun.
|
|
.IP "lszfcp -b 0.0.0815 -p 0x5005123456789000 -l 0x0000000000000000 -H -P -D"
|
|
Generates same output as previous example.
|
|
.SH "SEE ALSO"
|
|
.BR lscss (8)
|
|
|