Displaying information about SCSI devices
For each SCSI device, there is a number of read-only attributes in sysfs that provide information for the device.
About this task
/sys/bus/ccw/drivers/zfcp/<device_bus_id>/<wwpn>/<fcp_lun>/<attribute>| Attribute | Explanation |
|---|---|
| access_denied | Flag
that indicates whether access to the device is restricted by the FCP
channel. The value is If access is denied to your Linux instance, confirm that your SCSI devices are configured as intended. Also, be sure that you really want to share a SCSI device. For shared access to a SCSI device, preferably use NPIV). You might also use different FCP channels or target ports. |
| access_shared | This attribute
is obsolete. The value is always 0. |
| access_readonly | This attribute
is obsolete. The value is always 0. |
| in_recovery | Shows if unit is in recovery (0 or 1) |
/sys/class/scsi_device/<device_name>/device/<attribute>| Attribute | Explanation |
|---|---|
| device_blocked | Flag that indicates whether the device is in blocked state (0 or 1). |
| iocounterbits | The number of bits used for I/O counters. |
| iodone_cnt | The number of completed or rejected SCSI commands. |
| ioerr_cnt | The number of SCSI commands that completed with an error. |
| iorequest_cnt | The number of issued SCSI commands. |
| queue_type | The type of queue for the SCSI device. The value
can be one of the following types:
|
| model | The model of the SCSI device, received from inquiry data. |
| rev | The revision of the SCSI device, received from inquiry data. |
| scsi_level | The SCSI revision level, received from inquiry data. |
| type | The type of the SCSI device, received from inquiry data. |
| vendor | The vendor of the SCSI device, received from inquiry data. |
| fcp_lun | The LUN of the SCSI device in 64-bit format. |
| hba_id | The bus ID of the SCSI device. |
| wwpn | The WWPN of the remote port. |
| zfcp_access_denied | Flag
that indicates whether access to the device is restricted by the FCP
channel. The value is If access is denied to your Linux instance, confirm that your SCSI devices are configured as intended. Also, be sure that you really want to share a SCSI device. For shared access to a SCSI device, preferably use NPIV). You might also use different FCP channels or target ports. |
| zfcp_in_recovery | Shows if unit is in recovery (0 or 1). |
Procedure
# cat /sys/bus/ccw/drivers/zfcp/<device_bus_id>/<wwpn>/<fcp_lun>/<attribute>where:
- <device_bus_id>
- specifies the FCP device.
- <wwpn>
- is the WWPN of the target port.
- <fcp_lun>
- is the FCP LUN of the SCSI device.
- <attribute>
- is one of the attributes in Table 1.
Use the lszfcp command to display information about the associated SCSI device.
# cat /sys/class/scsi_device/<device_name>/device/<attribute>where:
- <device_name>
- is the name of the associated SCSI device.
- <attribute>
- is one of the attributes in Table 2.
Examples
- In this example, information is displayed for a
manually configured FCP LUN with LUN 0x4010403200000000 that is accessed
through a target port with WWPN 0x500507630300c562 and is attached
through an FCP device 0.0.3d0c. For the device, access is permitted.
# cat /sys/bus/ccw/drivers/zfcp/0.0.3d0c/0x500507630300c562/0x4010403200000000/access_denied 0
For the device to be accessible, the access_denied attribute of the target port, 0x500507630300c562, must also be
0(see Displaying port information). - You can use lszfcp to display attributes of
a SCSI device:
# lszfcp -l 0x4010403200000000 -a 0.0.3d0c/0x500507630300c562/0x4010403200000000 0:0:0:0 Class = "scsi_device" ... device_blocked = "0" ... fcp_lun = "0x4010403200000000" hba_id = "0.0.3d0c" iocounterbits = "32" iodone_cnt = "0xbe" ioerr_cnt = "0x2" iorequest_cnt = "0xbe" ... model = "2107900" queue_depth = "32" queue_ramp_up_period = "120000" queue_type = "simple" ... rev = ".166" scsi_level = "6" state = "running" timeout = "30" type = "0" uevent = "DEVTYPE=scsi_device" vendor = "IBM" ... wwpn = "0x500507630300c562" zfcp_access_denied = "0" zfcp_failed = "0" zfcp_in_recovery = "0" zfcp_status = "0x54000000"