25.1.3. Persistently setting DASDs online
The above instructions described how to activate DASDs dynamically in a running system. However, such changes are not persistent and do not survive a reboot. Making changes to the DASD configuration persistent in your Linux system depends on whether the DASDs belong to the root file system. Those DASDs required for the root file system need to be activated very early during the boot process by the initramfs
to be able to mount the root file system.
25.1.3.1. DASDs that are part of the root file system
The only file you have to modify to add DASDs that are part of the root file system is /etc/zipl.conf
. Then run the zipl boot loader tool. There is no need to recreate the initramfs
.
There are two boot parameters to activate DASDs early in the boot process:
rd_DASD=
rd_DASD_MOD=
— only provided for compatibility with old system configurations. Refer to the dasd=
parameter description in the DASD device driver chapter in Linux on System z Device Drivers, Features, and Commands on Red Hat Enterprise Linux 6 for details.
The rd_DASD
option takes a comma-separated list as input. The list contains a device bus ID and optional additional parameters consisting of key-value-pairs that correspond to DASD sysfs attributes.
Below is an example zipl.conf
for a system that uses physical volumes on partitions of two DASDs for an LVM volume group vg_devel1
that contains a logical volume lv_root
for the root file system.
[defaultboot]
default=linux
target=/boot/
[linux]
image=/boot/vmlinuz-2.6.32-19.el6.s390x
ramdisk=/boot/initramfs-2.6.32-19.el6.s390x.img
parameters="root=/dev/mapper/vg_devel1-lv_root rd_DASD=0.0.0200,use_diag=0,readonly=0,erplog=0,failfast=0 rd_DASD=0.0.0207,use_diag=0,readonly=0,erplog=0,failfast=0 rd_LVM_LV=vg_devel1/lv_root rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us cio_ignore=all,!0.0.0009"
Suppose that you would like to add another physical volume on a partition of a third DASD with device bus ID 0.0.202b
. To do this, simply add rd_DASD=0.0.202b
to the parameters line of your boot kernel in zipl.conf
:
[defaultboot]
default=linux
target=/boot/
[linux]
image=/boot/vmlinuz-2.6.32-19.el6.s390x
ramdisk=/boot/initramfs-2.6.32-19.el6.s390x.img
parameters="root=/dev/mapper/vg_devel1-lv_root rd_DASD=0.0.0200,use_diag=0,readonly=0,erplog=0,failfast=0 rd_DASD=0.0.0207,use_diag=0,readonly=0,erplog=0,failfast=0 rd_DASD=0.0.202b rd_LVM_LV=vg_devel1/lv_root rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us cio_ignore=all,!0.0.0009"
Run zipl
to apply the changes of /etc/zipl.conf
for the next IPL:
# zipl -V
Using config file '/etc/zipl.conf'
Target device information
Device..........................: 5e:00
Partition.......................: 5e:01
Device name.....................: dasda
DASD device number..............: 0201
Type............................: disk partition
Disk layout.....................: ECKD/compatible disk layout
Geometry - heads................: 15
Geometry - sectors..............: 12
Geometry - cylinders............: 3308
Geometry - start................: 24
File system block size..........: 4096
Physical block size.............: 4096
Device size in physical blocks..: 595416
Building bootmap in '/boot/'
Building menu 'rh-automatic-menu'
Adding #1: IPL section 'linux' (default)
kernel image......: /boot/vmlinuz-2.6.32-19.el6.s390x
kernel parmline...: 'root=/dev/mapper/vg_devel1-lv_root rd_DASD=0.0.0200,use_diag=0,readonly=0,erplog=0,failfast=0 rd_DASD=0.0.0207,use_diag=0,readonly=0,erplog=0,failfast=0 rd_DASD=0.0.202b rd_LVM_LV=vg_devel1/lv_root rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us cio_ignore=all,!0.0.0009'
initial ramdisk...: /boot/initramfs-2.6.32-19.el6.s390x.img
component address:
kernel image....: 0x00010000-0x00a70fff
parmline........: 0x00001000-0x00001fff
initial ramdisk.: 0x02000000-0x022d2fff
internal loader.: 0x0000a000-0x0000afff
Preparing boot device: dasda (0201).
Preparing boot menu
Interactive prompt......: enabled
Menu timeout............: 15 seconds
Default configuration...: 'linux'
Syncing disks...
Done.
25.1.3.2. DASDs that are not part of the root file system
DASDs that are not part of the root file system, that is, data disks, are persistently configured in the file /etc/dasd.conf
. It contains one DASD per line. Each line begins with the device bus ID of a DASD. Optionally, each line can continue with options separated by space or tab characters. Options consist of key-value-pairs, where the key and value are separated by an equals sign.
The key corresponds to any valid sysfs
attribute a DASD may have. The value will be written to the key's sysfs
attribute. Entries in /etc/dasd.conf
are activated and configured by udev when a DASD is added to the system. At boot time, all DASDs visible to the system get added and trigger udev.
Example content of /etc/dasd.conf
:
0.0.0207
0.0.0200 use_diag=1 readonly=1
Modifications of /etc/dasd.conf
only become effective after a reboot of the system or after the dynamic addition of a new DASD by changing the system's I/O configuration (that is, the DASD is attached under z/VM). Alternatively, you can trigger the activation of a new entry in /etc/dasd.conf
for a DASD which was previously not active, by executing the following commands:
Use the cio_ignore
command to remove the DASD from the list of ignored devices and make it visible to Linux:
# cio_ignore -r device_number
For example:
# cio_ignore -r 021a
Trigger the activation by writing to the uevent
attribute of the device:
echo add > /sys/bus/ccw/devices/device-bus-ID
/uevent
For example:
echo add > /sys/bus/ccw/devices/0.0.021a/uevent