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. |
| 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. |
| 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/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. The example shows
the attributes listed in Table 2 as well as other relevant
attributes:
# lszfcp -l 0x4010403200000000 -a 0.0.3d0c/0x500507630300c562/0x4010403200000000 0:0:0:1077035024 Class = "scsi_device" ... device_blocked = "0" ... iocounterbits = "32" iodone_cnt = "0xbe" ioerr_cnt = "0x2" iorequest_cnt = "0xbe" ... model = "2107900" queue_depth = "32" queue_ramp_up_period = "120000" ... rev = ".166" scsi_level = "6" state = "running" timeout = "30" type = "0" uevent = "DEVTYPE=scsi_device" vendor = "IBM" ... zfcp_access_denied = "0" zfcp_failed = "0" zfcp_in_recovery = "0" zfcp_status = "0x54000000"