Enabling the DASD device driver to use the DIAG access method
Linux® on z/VM® can use the DIAG access method to access DASDs with the help of z/VM functions.
Before you begin
- The Linux instance runs as a z/VM guest.
- The device can be of type ECKD with either LDL or CMS disk layout, or it can be a device of type FBA.
- The module for the DIAG component must be loaded.
- The module for the component that corresponds to the DASD type (dasd_eckd_mod or dasd_fba_mod) must be loaded.
- The DASD is offline.
- The DASD does not represent a parallel access volume alias device.
About this task
You can use the DIAG access method to access both ECKD and FBA-type DASD. You use the device's use_diag sysfs attribute to
enable or switch off the DIAG access method in a system that is online. Set the
use_diag attribute to 1
to enable the DIAG
access method. Set the use_diag attribute to 0
to switch
off the DIAG access method (this is the default).
Alternatively, you can specify diag
on the command line, for example during IPL,
to force the device driver to access the device (range) with the DIAG access method.
Procedure
# echo <flag> > /sys/bus/ccw/devices/<device_bus_id>/use_diag
where <device_bus_id> identifies the DASD.
If the DIAG access method is not available and you set the
use_diag attribute to 1
, you cannot set the device online.
For more details about DIAG, see z/VM: CP Programming Services, SC24-6272.
Example
In this example, the DIAG access method is enabled for a DASD with device number 0xb100.
- Ensure that the driver is loaded:
# modprobe dasd_diag_mod
- Identify the sysfs CCW-device directory for the device in question and change to that directory:
# cd /sys/bus/ccw/devices/0.0.b100/
- Ensure that the device is offline:
# echo 0 > online
- Enable the DIAG access method for this device by writing '1' to the use_diag sysfs attribute:
# echo 1 > use_diag
- Use the online attribute to set the device online:
# echo 1 > online