Chapter 13. Configuring a Linux instance on IBM Z

This section describes most of the common tasks for installing Red Hat Enterprise Linux on IBM Z.

13.1. Adding DASDs

Direct Access Storage Devices (DASDs) are a type of storage commonly used with IBM Z. For more information, see Working with DASDs in the IBM Knowledge Center. The following example is how to set a DASD online, format it, and make the change persistent.

Verify that the device is attached or linked to the Linux system if running under z/VM.

CP ATTACH EB1C TO *

To link a mini disk to which you have access, run the following commands:

CP LINK RHEL7X 4B2E 4B2E MR
DASD 4B2E LINKED R/W

13.2. Dynamically setting DASDs online

To set a DASD online, follow these steps:

  1. Use the cio_ignore utility to remove the DASD from the list of ignored devices and make it visible to Linux:

    # cio_ignore -r device_number

    Replace device_number with the device number of the DASD. For example:

    # cio_ignore -r 4b2e
  2. Set the device online. Use a command of the following form:

    # chccwdev -e device_number

    Replace device_number with the device number of the DASD. For example:

    # chccwdev -e 4b2e

    As an alternative, you can set the device online using sysfs attributes:

    1. Use the cd command to change to the /sys/ directory that represents that volume:

      # cd /sys/bus/ccw/drivers/dasd-eckd/0.0.4b2e/
      # ls -l
      total 0
      -r--r--r--  1 root root 4096 Aug 25 17:04 availability
      -rw-r--r--  1 root root 4096 Aug 25 17:04 cmb_enable
      -r--r--r--  1 root root 4096 Aug 25 17:04 cutype
      -rw-r--r--  1 root root 4096 Aug 25 17:04 detach_state
      -r--r--r--  1 root root 4096 Aug 25 17:04 devtype
      -r--r--r--  1 root root 4096 Aug 25 17:04 discipline
      -rw-r--r--  1 root root 4096 Aug 25 17:04 online
      -rw-r--r--  1 root root 4096 Aug 25 17:04 readonly
      -rw-r--r--  1 root root 4096 Aug 25 17:04 use_diag
    2. Check to see if the device is already online:

      # cat online
      0
    3. If it is not online, enter the following command to bring it online:

      # echo 1 > online
      # cat online
      1
  3. Verify which block devnode it is being accessed as:

    # ls -l
    total 0
    -r--r--r--  1 root root 4096 Aug 25 17:04 availability
    lrwxrwxrwx  1 root root    0 Aug 25 17:07 block -> ../../../../block/dasdb
    -rw-r--r--  1 root root 4096 Aug 25 17:04 cmb_enable
    -r--r--r--  1 root root 4096 Aug 25 17:04 cutype
    -rw-r--r--  1 root root 4096 Aug 25 17:04 detach_state
    -r--r--r--  1 root root 4096 Aug 25 17:04 devtype
    -r--r--r--  1 root root 4096 Aug 25 17:04 discipline
    -rw-r--r--  1 root root    0 Aug 25 17:04 online
    -rw-r--r--  1 root root 4096 Aug 25 17:04 readonly
    -rw-r--r--  1 root root 4096 Aug 25 17:04 use_diag

    As shown in this example, device 4B2E is being accessed as /dev/dasdb.

These instructions set a DASD online for the current session, but this is not persistent across reboots. For instructions on how to set a DASD online persistently, see Section 13.4, “Persistently setting DASDs online”. When you work with DASDs, use the persistent device symbolic links under /dev/disk/by-path/.

13.3. Preparing a new DASD with low-level formatting

Once the disk is online, change back to the /root directory and low-level format the device. This is only required once for a DASD during its entire lifetime:

# cd /root
# dasdfmt -b 4096 -d cdl -p /dev/disk/by-path/ccw-0.0.4b2e
Drive Geometry: 10017 Cylinders * 15 Heads =  150255 Tracks

I am going to format the device /dev/disk/by-path/ccw-0.0.4b2e in the following way:
Device number of device : 0x4b2e
Labelling device        : yes
Disk label              : VOL1
Disk identifier         : 0X4B2E
Extent start (trk no)   : 0
Extent end (trk no)     : 150254
Compatible Disk Layout  : yes
Blocksize               : 4096

--->> ATTENTION! <<---
All data of that device will be lost.
Type "yes" to continue, no will leave the disk untouched: yes
cyl    97 of  3338 |#----------------------------------------------|   2%

When the progress bar reaches the end and the format is complete, dasdfmt prints the following output:

Rereading the partition table...
Exiting...

Now, use fdasd to partition the DASD. You can create up to three partitions on a DASD. In our example here, we create one partition spanning the whole disk:

# fdasd -a /dev/disk/by-path/ccw-0.0.4b2e
reading volume label ..: VOL1
reading vtoc ..........: ok

auto-creating one partition for the whole disk...
writing volume label...
writing VTOC...
rereading partition table...

After a (low-level formatted) DASD is online, it can be used like any other disk under Linux. For instance, you can create file systems, LVM physical volumes, or swap space on its partitions, for example /dev/disk/by-path/ccw-0.0.4b2e-part1. Never use the full DASD device (dev/dasdb) for anything but the commands dasdfmt and fdasd. If you want to use the entire DASD, create one partition spanning the entire drive as in the fdasd example above.

To add additional disks later without breaking existing disk entries in, for example, /etc/fstab, use the persistent device symbolic links under /dev/disk/by-path/.

13.4. 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.

The cio_ignore commands are handled transparently for persistent device configurations and you do not need to free devices from the ignore list manually.

13.5. DASDs that are part of the root file system

The file you have to modify to add DASDs that are part of the root file system has changed in Red Hat Enterprise Linux 8. Instead of editing the /etc/zipl.conf file, the new file to be edited, and its location, may be found by running the following commands:

# machine_id=$(cat /etc/machine-id)
# kernel_version=$(uname -r)
# ls /boot/loader/entries/$machine_id-$kernel_version.conf

There is one boot option to activate DASDs early in the boot process: rd.dasd=. This 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 of the /boot/loader/entries/4ab74e52867b4f998e73e06cf23fd761-4.18.0-80.el8.s390x.conf file 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.

title Red Hat Enterprise Linux (4.18.0-80.el8.s390x) 8.0 (Ootpa)
version 4.18.0-80.el8.s390x
linux /boot/vmlinuz-4.18.0-80.el8.s390x
initrd /boot/initramfs-4.18.0-80.el8.s390x.img
options root=/dev/mapper/vg_devel1-lv_root crashkernel=auto rd.dasd=0.0.0200 rd.dasd=0.0.0207 rd.lvm.lv=vg_devel1/lv_root rd.lvm.lv=vg_devel1/lv_swap cio_ignore=all,!condev rd.znet=qeth,0.0.0a00,0.0.0a01,0.0.0a02,layer2=1,portno=0
id rhel-20181027190514-4.18.0-80.el8.s390x
grub_users $grub_users
grub_arg --unrestricted
grub_class kernel

To add another physical volume on a partition of a third DASD with device bus ID 0.0.202b. To do this, add rd.dasd=0.0.202b to the parameters line of your boot kernel in /boot/loader/entries/4ab74e52867b4f998e73e06cf23fd761-4.18.0-32.el8.s390x.conf:

title Red Hat Enterprise Linux (4.18.0-80.el8.s390x) 8.0 (Ootpa)
version 4.18.0-80.el8.s390x
linux /boot/vmlinuz-4.18.0-80.el8.s390x
initrd /boot/initramfs-4.18.0-80.el8.s390x.img
options root=/dev/mapper/vg_devel1-lv_root crashkernel=auto rd.dasd=0.0.0200 rd.dasd=0.0.0207 rd.dasd=0.0.202b rd.lvm.lv=vg_devel1/lv_root rd.lvm.lv=vg_devel1/lv_swap cio_ignore=all,!condev rd.znet=qeth,0.0.0a00,0.0.0a01,0.0.0a02,layer2=1,portno=0
id rhel-20181027190514-4.18.0-80.el8.s390x
grub_users $grub_users
grub_arg --unrestricted
grub_class kernel
Warning

Make sure the length of the kernel command line in the configuration file does not exceed 896 bytes. Otherwise, the boot loader cannot be saved, and the installation fails.

Run zipl to apply the changes of the configuration file for the next IPL:

# zipl -V
Using config file '/etc/zipl.conf'
Using BLS config file '/boot/loader/entries/4ab74e52867b4f998e73e06cf23fd761-4.18.0-80.el8.s390x.conf'
Target device information
  Device..........................: 5e:00
  Partition.......................: 5e:01
  Device name.....................: dasda
  Device driver name..............: dasd
  DASD device number..............: 0201
  Type............................: disk partition
  Disk layout.....................: ECKD/compatible disk layout
  Geometry - heads................: 15
  Geometry - sectors..............: 12
  Geometry - cylinders............: 13356
  Geometry - start................: 24
  File system block size..........: 4096
  Physical block size.............: 4096
  Device size in physical blocks..: 262152
Building bootmap in '/boot'
Building menu 'zipl-automatic-menu'
Adding #1: IPL section '4.18.0-80.el8.s390x' (default)
  initial ramdisk...: /boot/initramfs-4.18.0-80.el8.s390x.img
  kernel image......: /boot/vmlinuz-4.18.0-80.el8.s390x
  kernel parmline...: 'root=/dev/mapper/vg_devel1-lv_root crashkernel=auto rd.dasd=0.0.0200 rd.dasd=0.0.0207 rd.dasd=0.0.202b rd.lvm.lv=vg_devel1/lv_root rd.lvm.lv=vg_devel1/lv_swap cio_ignore=all,!condev rd.znet=qeth,0.0.0a00,0.0.0a01,0.0.0a02,layer2=1,portno=0'
  component address:
    kernel image....: 0x00010000-0x0049afff
    parmline........: 0x0049b000-0x0049bfff
    initial ramdisk.: 0x004a0000-0x01a26fff
    internal loader.: 0x0000a000-0x0000cfff
Preparing boot menu
  Interactive prompt......: enabled
  Menu timeout............: 5 seconds
  Default configuration...: '4.18.0-80.el8.s390x'
Preparing boot device: dasda (0201).
Syncing disks...
Done.

13.6. FCP LUNs that are part of the root file system

The only file you have to modify for adding FCP LUNs that are part of the root file system has changed in Red Hat Enterprise Linux 8. Instead of editing the /etc/zipl.conf file, the new file to be edited, and its location, may be found by running the following commands:

# machine_id=$(cat /etc/machine-id)
# kernel_version=$(uname -r)
# ls /boot/loader/entries/$machine_id-$kernel_version.conf

Red Hat Enterprise Linux provides a parameter to activate FCP LUNs early in the boot process: rd.zfcp=. The value is a comma-separated list containing the device bus ID, the WWPN as 16 digit hexadecimal number prefixed with 0x, and the FCP LUN prefixed with 0x and padded with zeroes to the right to have 16 hexadecimal digits.

Below is an example of the /boot/loader/entries/4ab74e52867b4f998e73e06cf23fd761-4.18.0-80.el8.s390x.conf file for a system that uses physical volumes on partitions of two FCP LUNs for an LVM volume group vg_devel1 that contains a logical volume lv_root for the root file system. For simplicity, the example shows a configuration without multipathing.

title Red Hat Enterprise Linux (4.18.0-32.el8.s390x) 8.0 (Ootpa)
version 4.18.0-32.el8.s390x
linux /boot/vmlinuz-4.18.0-32.el8.s390x
initrd /boot/initramfs-4.18.0-32.el8.s390x.img
options root=/dev/mapper/vg_devel1-lv_root crashkernel=auto rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a000000000 rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a100000000 rd.lvm.lv=vg_devel1/lv_root rd.lvm.lv=vg_devel1/lv_swap cio_ignore=all,!condev rd.znet=qeth,0.0.0a00,0.0.0a01,0.0.0a02,layer2=1,portno=0
id rhel-20181027190514-4.18.0-32.el8.s390x
grub_users $grub_users
grub_arg --unrestricted
grub_class kernel

To add another physical volume on a partition of a third FCP LUN with device bus ID 0.0.fc00, WWPN 0x5105074308c212e9 and FCP LUN 0x401040a300000000, add rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a300000000 to the parameters line of your boot kernel in /boot/loader/entries/4ab74e52867b4f998e73e06cf23fd761-4.18.0-32.el8.s390x.conf. For example:

title Red Hat Enterprise Linux (4.18.0-32.el8.s390x) 8.0 (Ootpa)
version 4.18.0-32.el8.s390x
linux /boot/vmlinuz-4.18.0-32.el8.s390x
initrd /boot/initramfs-4.18.0-32.el8.s390x.img
options root=/dev/mapper/vg_devel1-lv_root crashkernel=auto rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a000000000 rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a100000000 rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a300000000 rd.lvm.lv=vg_devel1/lv_root rd.lvm.lv=vg_devel1/lv_swap cio_ignore=all,!condev rd.znet=qeth,0.0.0a00,0.0.0a01,0.0.0a02,layer2=1,portno=0
id rhel-20181027190514-4.18.0-32.el8.s390x
grub_users $grub_users
grub_arg --unrestricted
grub_class kernel
Warning

Make sure the length of the kernel command line in the configuration file does not exceed 896 bytes. Otherwise, the boot loader cannot be saved, and the installation fails.

Run zipl to apply the changes of the configuration file for the next IPL:

# zipl -V
Using config file '/etc/zipl.conf'
Using BLS config file '/boot/loader/entries/4ab74e52867b4f998e73e06cf23fd761-4.18.0-32.el8.s390x.conf'
Target device information
Device..........................: 08:00
Partition.......................: 08:01
Device name.....................: sda
Device driver name..............: sd
Type............................: disk partition
Disk layout.....................: SCSI disk layout
Geometry - start................: 2048
File system block size..........: 4096
Physical block size.............: 512
Device size in physical blocks..: 10074112
Building bootmap in '/boot/'
Building menu 'rh-automatic-menu'
Adding #1: IPL section '4.18.0-32.el8.s390x' (default)
kernel image......: /boot/vmlinuz-4.18.0-32.el8.s390x
kernel parmline...: 'root=/dev/mapper/vg_devel1-lv_root crashkernel=auto rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a000000000 rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a100000000 rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a300000000 rd.lvm.lv=vg_devel1/lv_root rd.lvm.lv=vg_devel1/lv_swap cio_ignore=all,!condev rd.znet=qeth,0.0.0a00,0.0.0a01,0.0.0a02,layer2=1,portno=0'
initial ramdisk...: /boot/initramfs-4.18.0-32.el8.s390x.img
component address:
kernel image....: 0x00010000-0x007a21ff
parmline........: 0x00001000-0x000011ff
initial ramdisk.: 0x02000000-0x028f63ff
internal loader.: 0x0000a000-0x0000a3ff
Preparing boot device: sda.
Detected SCSI PCBIOS disk layout.
Writing SCSI master boot record.
Syncing disks...
Done.

13.7. FCP LUNs that are not part of the root file system

FCP LUNs that are not part of the root file system, such as data disks, are persistently configured in the file /etc/zfcp.conf. It contains one FCP LUN per line. Each line contains the device bus ID of the FCP adapter, the WWPN as 16 digit hexadecimal number prefixed with 0x, and the FCP LUN prefixed with 0x and padded with zeroes to the right to have 16 hexadecimal digits, separated by a space or tab. Entries in /etc/zfcp.conf are activated and configured by udev when an FCP adapter is added to the system. At boot time, all FCP adapters visible to the system are added and trigger udev.

Example content of /etc/zfcp.conf:

0.0.fc00 0x5105074308c212e9 0x401040a000000000
0.0.fc00 0x5105074308c212e9 0x401040a100000000
0.0.fc00 0x5105074308c212e9 0x401040a300000000
0.0.fcd0 0x5105074308c2aee9 0x401040a000000000
0.0.fcd0 0x5105074308c2aee9 0x401040a100000000
0.0.fcd0 0x5105074308c2aee9 0x401040a300000000

Modifications of /etc/zfcp.conf only become effective after a reboot of the system or after the dynamic addition of a new FCP channel by changing the system’s I/O configuration (for example, a channel is attached under z/VM). Alternatively, you can trigger the activation of a new entry in /etc/zfcp.conf for an FCP adapter which was previously not active, by executing the following commands:

  1. Use the cio_ignore utility to remove the FCP adapter from the list of ignored devices and make it visible to Linux:

    # cio_ignore -r device_number

    Replace device_number with the device number of the FCP adapter. For example:

    # cio_ignore -r fcfc
  2. To trigger the uevent that activates the change, issue:

    # echo add > /sys/bus/ccw/devices/device-bus-ID/uevent

    For example:

    # echo add > /sys/bus/ccw/devices/0.0.fcfc/uevent

13.8. Adding a qeth device

The qeth network device driver supports IBM Z OSA-Express features in QDIO mode, HiperSockets, z/VM guest LAN, and z/VM VSWITCH.

The qeth device driver assigns the same interface name for Ethernet and Hipersockets devices: enc<device number>. The bus ID is composed of the channel subsystem ID, subchannel set ID, and device number, separated by dots; the device number is the last part of the bus ID, without leading zeroes. For example, the interface name will be enca00 for a device with the bus ID 0.0.0a00.

13.9. Dynamically adding a qeth device

To add a qeth device dynamically, follow these steps:

  1. Determine whether the qeth device driver modules are loaded. The following example shows loaded qeth modules:

    # lsmod | grep qeth
    qeth_l3                69632  0
    qeth_l2                49152  1
    qeth                  131072  2 qeth_l3,qeth_l2
    qdio                   65536  3 qeth,qeth_l3,qeth_l2
    ccwgroup               20480  1 qeth

    If the output of the lsmod command shows that the qeth modules are not loaded, run the modprobe command to load them:

    # modprobe qeth
  2. Use the cio_ignore utility to remove the network channels from the list of ignored devices and make them visible to Linux:

    # cio_ignore -r read_device_bus_id,write_device_bus_id,data_device_bus_id

    Replace read_device_bus_id,write_device_bus_id,data_device_bus_id with the three device bus IDs representing a network device. For example, if the read_device_bus_id is 0.0.f500, the write_device_bus_id is 0.0.f501, and the data_device_bus_id is 0.0.f502:

    # cio_ignore -r 0.0.f500,0.0.f501,0.0.f502
  3. Use the znetconf utility to sense and list candidate configurations for network devices:

    # znetconf -u
    Scanning for network devices...
    Device IDs                 Type    Card Type      CHPID Drv.
    ------------------------------------------------------------
    0.0.f500,0.0.f501,0.0.f502 1731/01 OSA (QDIO)        00 qeth
    0.0.f503,0.0.f504,0.0.f505 1731/01 OSA (QDIO)        01 qeth
    0.0.0400,0.0.0401,0.0.0402 1731/05 HiperSockets      02 qeth
  4. Select the configuration you want to work with and use znetconf to apply the configuration and to bring the configured group device online as network device.

    # znetconf -a f500
    Scanning for network devices...
    Successfully configured device 0.0.f500 (encf500)
  5. Optionally, you can also pass arguments that are configured on the group device before it is set online:

    # znetconf -a f500 -o portname=myname
    Scanning for network devices...
    Successfully configured device 0.0.f500 (encf500)

    Now you can continue to configure the encf500 network interface.

Alternatively, you can use sysfs attributes to set the device online as follows:

  1. Create a qeth group device:

    # echo read_device_bus_id,write_device_bus_id,data_device_bus_id > /sys/bus/ccwgroup/drivers/qeth/group

    For example:

    # echo 0.0.f500,0.0.f501,0.0.f502 > /sys/bus/ccwgroup/drivers/qeth/group
  2. Next, verify that the qeth group device was created properly by looking for the read channel:

    # ls /sys/bus/ccwgroup/drivers/qeth/0.0.f500

    You can optionally set additional parameters and features, depending on the way you are setting up your system and the features you require, such as:

    • portno
    • layer2
    • portname
  3. Bring the device online by writing 1 to the online sysfs attribute:

    # echo 1 > /sys/bus/ccwgroup/drivers/qeth/0.0.f500/online
  4. Then verify the state of the device:

    # cat /sys/bus/ccwgroup/drivers/qeth/0.0.f500/online
    											1

    A return value of 1 indicates that the device is online, while a return value 0 indicates that the device is offline.

  5. Find the interface name that was assigned to the device:

    # cat /sys/bus/ccwgroup/drivers/qeth/0.0.f500/if_name
    encf500

    Now you can continue to configure the encf500 network interface.

    The following command from the s390utils package shows the most important settings of your qeth device:

    # lsqeth encf500
    Device name                     : encf500
    -------------------------------------------------
    card_type               : OSD_1000
    cdev0                   : 0.0.f500
    cdev1                   : 0.0.f501
    cdev2                   : 0.0.f502
    chpid                   : 76
    online                  : 1
    portname                : OSAPORT
    portno                  : 0
    state                   : UP (LAN ONLINE)
    priority_queueing       : always queue 0
    buffer_count            : 16
    layer2                  : 1
    isolation               : none

13.10. Persistently adding a qeth device

To make your new qeth device persistent, you need to create the configuration file for your new interface. The network interface configuration files are placed in the /etc/sysconfig/network-scripts/ directory.

The network configuration files use the naming convention ifcfg-device, where device is the value found in the if_name file in the qeth group device that was created earlier, for example enc9a0. The cio_ignore commands are handled transparently for persistent device configurations and you do not need to free devices from the ignore list manually.

If a configuration file for another device of the same type already exists, the simplest way to add the config file is to copy it to the new name and then edit it:

# cd /etc/sysconfig/network-scripts
# cp ifcfg-enc9a0 ifcfg-enc600

To learn IDs of your network devices, use the lsqeth utility:

# lsqeth -p
devices                    CHPID interface        cardtype       port chksum prio-q'ing rtr4 rtr6 lay'2 cnt
-------------------------- ----- ---------------- -------------- ---- ------ ---------- ---- ---- ----- -----
0.0.09a0/0.0.09a1/0.0.09a2 x00   enc9a0    Virt.NIC QDIO  0    sw     always_q_2 n/a  n/a  1     64
0.0.0600/0.0.0601/0.0.0602 x00   enc600    Virt.NIC QDIO  0    sw     always_q_2 n/a  n/a  1     64

If you do not have a similar device defined, you must create a new file. Use this example of /etc/sysconfig/network-scripts/ifcfg-0.0.09a0 as a template:

# IBM QETH
DEVICE=enc9a0
BOOTPROTO=static
IPADDR=10.12.20.136
NETMASK=255.255.255.0
ONBOOT=yes
NETTYPE=qeth
SUBCHANNELS=0.0.09a0,0.0.09a1,0.0.09a2
PORTNAME=OSAPORT
OPTIONS='layer2=1 portno=0'
MACADDR=02:00:00:23:65:1a
TYPE=Ethernet

Edit the new ifcfg-0.0.0600 file as follows:

  1. Modify the DEVICE statement to reflect the contents of the if_name file from your ccw group.
  2. Modify the IPADDR statement to reflect the IP address of your new interface.
  3. Modify the NETMASK statement as needed.
  4. If the new interface is to be activated at boot time, then make sure ONBOOT is set to yes.
  5. Make sure the SUBCHANNELS statement matches the hardware addresses for your qeth device.
  6. Modify the PORTNAME statement or leave it out if it is not necessary in your environment.
  7. You can add any valid sysfs attribute and its value to the OPTIONS parameter. The Red Hat Enterprise Linux installation program currently uses this to configure the layer mode (layer2) and the relative port number (portno) of qeth devices.

    The qeth device driver default for OSA devices is now layer 2 mode. To continue using old ifcfg definitions that rely on the previous default of layer 3 mode, add layer2=0 to the OPTIONS parameter.

/etc/sysconfig/network-scripts/ifcfg-0.0.0600

# IBM QETH
DEVICE=enc600
BOOTPROTO=static
IPADDR=192.168.70.87
NETMASK=255.255.255.0
ONBOOT=yes
NETTYPE=qeth
SUBCHANNELS=0.0.0600,0.0.0601,0.0.0602
PORTNAME=OSAPORT
OPTIONS='layer2=1 portno=0'
MACADDR=02:00:00:b3:84:ef
TYPE=Ethernet

Changes to an ifcfg file only become effective after rebooting the system or after the dynamic addition of new network device channels by changing the system’s I/O configuration (for example, attaching under z/VM). Alternatively, you can trigger the activation of a ifcfg file for network channels which were previously not active yet, by executing the following commands:

  1. Use the cio_ignore utility to remove the network channels from the list of ignored devices and make them visible to Linux:

    # cio_ignore -r read_device_bus_id,write_device_bus_id,data_device_bus_id

    Replace read_device_bus_id,write_device_bus_id,data_device_bus_id with the three device bus IDs representing a network device. For example, if the read_device_bus_id is 0.0.0600, the write_device_bus_id is 0.0.0601, and the data_device_bus_id is 0.0.0602:

    #  cio_ignore -r 0.0.0600,0.0.0601,0.0.0602
  2. To trigger the uevent that activates the change, issue:

    # echo add > /sys/bus/ccw/devices/read-channel/uevent

    For example:

    # echo add > /sys/bus/ccw/devices/0.0.0600/uevent
  3. Check the status of the network device:

    # lsqeth
  4. Now start the new interface:

    # ifup enc600
  5. Check the status of the interface:

    # ip addr show enc600
    3: enc600:  <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 3c:97:0e:51:38:17 brd ff:ff:ff:ff:ff:ff
    inet 10.85.1.245/24 brd 10.34.3.255 scope global dynamic enc600
    valid_lft 81487sec preferred_lft 81487sec
    inet6 1574:12:5:1185:3e97:eff:fe51:3817/64 scope global noprefixroute dynamic
    valid_lft 2591994sec preferred_lft 604794sec
    inet6 fe45::a455:eff:d078:3847/64 scope link
    valid_lft forever preferred_lft forever
  6. Check the routing for the new interface:

    # ip route
    default via 10.85.1.245 dev enc600  proto static  metric 1024
    12.34.4.95/24 dev enp0s25  proto kernel  scope link  src 12.34.4.201
    12.38.4.128 via 12.38.19.254 dev enp0s25  proto dhcp  metric 1
    192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1
  7. Verify your changes by using the ping utility to ping the gateway or another host on the subnet of the new device:

    # ping -c 1 192.168.70.8
    PING 192.168.70.8 (192.168.70.8) 56(84) bytes of data.
    64 bytes from 192.168.70.8: icmp_seq=0 ttl=63 time=8.07 ms
  8. If the default route information has changed, you must also update /etc/sysconfig/network accordingly.

13.11. Configuring an IBM Z network device for network root file system

To add a network device that is required to access the root file system, you only have to change the boot options. The boot options can be in a parameter file, however, the /etc/zipl.conf file no longer contains specifications of the boot records. The file that needs to be modified can be located using the following commands:

# machine_id=$(cat /etc/machine-id)
# kernel_version=$(uname -r)
# ls /boot/loader/entries/$machine_id-$kernel_version.conf

There is no need to recreate the initramfs.

Dracut, the mkinitrd successor that provides the functionality in the initramfs that in turn replaces initrd, provides a boot parameter to activate network devices on IBM Z early in the boot process: rd.znet=.

As input, this parameter takes a comma-separated list of the NETTYPE (qeth, lcs, ctc), two (lcs, ctc) or three (qeth) device bus IDs, and optional additional parameters consisting of key-value pairs corresponding to network device sysfs attributes. This parameter configures and activates the IBM Z network hardware. The configuration of IP addresses and other network specifics works the same as for other platforms. See the dracut documentation for more details.

The cio_ignore commands for the network channels are handled transparently on boot.

Example boot options for a root file system accessed over the network through NFS:

root=10.16.105.196:/nfs/nfs_root cio_ignore=all,!condev rd.znet=qeth,0.0.0a00,0.0.0a01,0.0.0a02,layer2=1,portno=0,portname=OSAPORT ip=10.16.105.197:10.16.105.196:10.16.111.254:255.255.248.0:nfs‑server.subdomain.domain:enc9a0:none rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us