Changing the exclusion list

Ubuntu 22.04 LTS LPAR mode z/VM guest KVM guest

Use the cio_ignore command or the procfs interface to view or change the list of I/O device specifications that are ignored.

When an instance of Linux® on IBM® Z boots, it senses and analyzes all available I/O devices. You can use the cio_ignore kernel parameter to list specifications for devices that are to be ignored.

On a running Linux instance, you can view and change the exclusion list through a procfs interface or with the cio_ignore command. This information describes the procfs interface.

After booting Linux you can display the exclusion list by issuing:
# cat /proc/cio_ignore
To add device specifications to the exclusion list issue a command of this form:
# echo add <device_list> > /proc/cio_ignore

When you add specifications for a device that is already sensed and analyzed, there is no immediate effect of adding it to the exclusion list. For example, the device still appears in the output of the lscss command and can be set online. However, if the device later becomes unavailable, it is ignored when it reappears. For example, if the device is detached in z/VM® it is ignored when it is attached again.

To make all devices that are in the exclusion list and that are currently offline unavailable to Linux issue a command of this form:
# echo purge > /proc/cio_ignore
This command does not make devices unavailable if they are online.
To remove device specifications from the exclusion list issue a command of this form:
# echo free <device_list> > /proc/cio_ignore
When you remove device specifications from the exclusion list, the corresponding devices are sensed and analyzed if they exist. Where possible, the respective device driver is informed, and the devices become available to Linux.

In these commands, <device_list> follows this syntax:

<device_list>
Read syntax diagramSkip visual syntax diagramall<device_spec>,,!<device_spec>
<device_spec>
Read syntax diagramSkip visual syntax diagram<device_bus_id><from_device_bus_id>-<to_device_bus_id>
Where:
all
states that all devices are to be ignored.
<device_bus_id>
specifies a device. Device bus-IDs are of the form 0.<n>.<devno>, where <n> is a subchannel set ID and <devno> is a device number.
<from_device_bus_id>-<to_device_bus_id>
are two device bus-IDs that specify the first and the last device in a range of devices.
ipldev
specifies the IPL device. Use this keyword with the ! operator to avoid ignoring the IPL device.
condev
specifies the CCW console. Use this keyword with the ! operator to avoid ignoring the console device.
!
makes the following term an exclusion statement. This operator is used to exclude individual devices or ranges of devices from a preceding more general specification of devices.

Ensure device availability

After the echo command completes successfully, some time might elapse until the freed device becomes available to Linux. Issue the following command to ensure that the device is ready to be used:
# echo 1 > /proc/cio_settle
This command returns after all required sysfs structures for the newly available device are completed. The cio_ignore command also returns after any new sysfs structures are completed. You do not need a separate echo command when using cio_ignore to remove devices from the exclusion list.

Results

The dynamically changed exclusion list is taken into account only when a device in this list is newly made available to the system, for example after it is defined to the system. It does not have any effect on setting devices online or offline within Linux.

Examples

  • This command removes all devices from the exclusion list.
    # echo free all > /proc/cio_ignore
  • This command adds all devices in the range 0.0.b100 through 0.0.b1ff and device 0.0.a100 to the exclusion list.
    # echo add 0.0.b100-0.0.b1ff,0.0.a100 > /proc/cio_ignore
  • This command lists the ranges of devices that are ignored by common I/O.
    # cat /proc/cio_ignore
    0.0.0000-0.0.a0ff
    0.0.a101-0.0.b0ff
    0.0.b200-0.0.ffff
  • This command removes all devices in the range 0.0.b100 through 0.0.b1ff and device 0.0.a100 from the exclusion list.
    # echo free 0.0.b100-0.0.b1ff,0.0.a100 > /proc/cio_ignore
  • This command removes the device with bus ID 0.0.c104 from the exclusion list.
    # echo free 0.0.c104 > /proc/cio_ignore
  • This command adds the device with bus ID 0.0.c104 to the exclusion list.
    # echo add 0.0.c104 > /proc/cio_ignore
  • This command makes all devices that are in the exclusion list and that are currently offline unavailable to Linux.
    # echo purge > /proc/cio_ignore