Displaying DASD information

Red Hat Enterprise Linux 8.6 LPAR mode z/VM guest KVM guest

Use tools to display information about your DASDs, or read the attributes of the devices in sysfs.

About this task

There are several methods to display DASD information:
  • Use lsdasd -l to display summary information about the device settings and the device geometry of multiple DASDs.
  • Use dasdview to display details about the contents of a particular DASD.
  • Read information about a particular DASD from sysfs, as described in this section.

The sysfs representation of a DASD is a directory of the form /sys/bus/ccw/devices/<device_bus_id>, where <device_bus_id> is the bus ID of the DASD. This sysfs directory contains a number of attributes with information about the DASD.

Table 1. Attributes with DASD information
Attribute Explanation
alias 1 if the DASD is a parallel access volume (PAV) alias device. 0 if the DASD is a PAV base device or has not been set up as a PAV device.

For an example of how to use PAV see How to Improve Performance with PAV, SC33-8414 on IBM® Documentation at https://www.ibm.com/support/knowledgecenter/linuxonibm/liaaf/lnz_r_hp.html

This attribute is read-only.

discipline Indicates the base discipline, ECKD or FBA, that is used to access the DASD. If DIAG is enabled, this attribute might read DIAG instead of the base discipline.

This attribute is read-only.

eer_enabled 1 if the DASD is enabled for extended error reporting, 0 if it is not enabled (see Using extended error reporting for ECKD type DASD).
erplog 1 if error recovery processing (ERP) logging is enabled, 0 if ERP logging is not enabled (see Enabling and disabling logging).
ese Read-only attribute that contains 1 if the DASD is extent space efficient (ESE). Otherwise 0. For details, see Managing extent space efficient DASDs.
expires Indicates the time, in seconds, that Linux® waits for a response to an I/O request for the DASD. If this time expires, Linux considers a request as failed and cancels it (see Setting the timeout for I/O requests).
failfast 1 if I/O operations are returned as failed immediately when the last path to the DASD is lost. 0 if a wait period for a path to return expires before an I/O operation is returned as failed. (see Enabling and disabling immediate failure of I/O requests).
fc_security Read-only attribute that contains Encryption if the connection to the DASD is encrypted. For details, see Querying the encryption setting of a channel path.
host_access_count Shows how many operating system instances have access to the device. See Checking for access by other operating system instances.
hpf 1 if High Performance FICON is available for the device. See Querying the HPF setting of a channel path.
last_known_reservation_state
The reservation state as held by the DASD device driver. Values can be:
none
The DASD device driver has no information about the device reservation state.
reserved
The DASD device driver holds a valid reservation for the DASD.
lost
The DASD device driver had reserved the device, but this reservation has been lost to another system.

See Reading and resetting the reservation state for details.

online 1 if the DASD is online, 0 if it is offline (see Setting a DASD online or offline).
path_autodisable
path_interval
path_threshold
Control the automatic removal of defective channel path (see Setting defective channel paths offline automatically)
raw_track_access 1 if the DASD is in raw-track access mode, 0 if it is in default access mode (see Accessing full ECKD tracks).
readonly 1 if the DASD is read-only, 0 if it can be written to. This attribute is a device driver setting and does not reflect any restrictions that are imposed by the device itself. This attribute is ignored for PAV alias devices.
status Reflects the internal state of a DASD device. Values can be:
unknown
Device detection has not started yet.
new
Detection of basic device attributes is in progress.
detected
Detection of basic device attributes has finished.
basic
The device is ready for detecting the disk layout. Low-level tools can set a device to this state when changing the disk layout, for example, when formatting the device.
unformatted
The disk layout detection found no valid disk layout. The device is ready for use with low-level tools like dasdfmt.
ready
The device is in an intermediate state.
online
The device is ready for use.
uid A device identifier of the form <vendor>.<serial>.<subsystem_id>.<unit_address>.<minidisk_identifier> where
<vendor>
is the specification from the vendor attribute.
<serial>
is the serial number of the storage system.
<subsystem_id>
is the ID of the logical subsystem to which the DASD belongs on the storage system.
<unit_address>
is the address that is used within the storage system to identify the DASD.
<minidisk_identifier>
is an identifier that the z/VM® system assigns to distinguish between minidisks on the DASD. This part of the uid is only present for Linux on z/VM and if the z/VM version and service level support this identifier.

This attribute is read-only.

use_diag 1 if the DIAG access method is enabled, 0 if the DIAG access method is not enabled (see Enabling the DASD device driver to use the DIAG access method). Do not enable the DIAG access method for PAV alias devices.
vendor Identifies the manufacturer of the storage system that contains the DASD.

This attribute is read-only.

Additionally, the representation in sysfs of a DASD device has the following subdirectories:
  • /sys/bus/ccw/devices/<device_bus_id>/extent_pool
    
    The extent_pool subdirectory contains read-only attributes that, for an ESE DASD, provides information about the pool of extents in which the DASD is defined.
  • /sys/bus/ccw/devices/<device_bus_id>/capacity
    The capacity subdirectory contains read-only attributes that shows the capacity of a DASD in cylinders.
For details about the attributes, see Gathering information about ESE DASD.

There are some more attributes that are common to all CCW devices (see Device directories).

Procedure

Issue a command of this form to read an attribute:
# cat /sys/bus/ccw/devices/<device_bus_id>/<attribute>
where <attribute> is one of the attributes of Table 1.

Example

The following sequence of commands reads the attributes for a DASD with a device bus-ID 0.0.b100:
# cat /sys/bus/ccw/devices/0.0.b100/alias
0
# cat /sys/bus/ccw/devices/0.0.b100/discipline
ECKD
# cat /sys/bus/ccw/devices/0.0.b100/eer_enabled
0
# cat /sys/bus/ccw/devices/0.0.b100/erplog
0
# cat /sys/bus/ccw/devices/0.0.b100/ese
0
# cat /sys/bus/ccw/devices/0.0.b100/expires
30
# cat /sys/bus/ccw/devices/0.0.b100/failfast
0
# cat /sys/bus/ccw/devices/0.0.b100/host_access_count
1
# cat /sys/bus/ccw/devices/0.0.b100/hpf
1
# cat /sys/bus/ccw/devices/0.0.b100/last_known_reservation_state
reserved
# cat /sys/bus/ccw/devices/0.0.b100/online
1
# cat /sys/bus/ccw/devices/0.0.b100/path_autodisable
1
# cat /sys/bus/ccw/devices/0.0.b100/path_interval
300
# cat /sys/bus/ccw/devices/0.0.b100/path_threshold
256
# cat /sys/bus/ccw/devices/0.0.b100/raw_track_access
0
# cat /sys/bus/ccw/devices/0.0.b100/readonly
1
# cat /sys/bus/ccw/devices/0.0.b100/status
online
# cat /sys/bus/ccw/devices/0.0.b100/uid
IBM.75000000092461.e900.8a
# cat /sys/bus/ccw/devices/0.0.b100/use_diag
1
# cat /sys/bus/ccw/devices/0.0.b100/vendor
IBM