chccwdev - Set CCW device attributes

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

Use the chccwdev command to set attributes for CCW devices and to set CCW devices online or offline.

The chccwdev command uses cio_settle before it changes anything, to ensure that sysfs reflects the latest device status information, and includes newly available devices.

chccwdev syntax

Read syntax diagramSkip visual syntax diagramchccwdev -e -d -s-f   -a  <name>= <value> ,<device_bus_id><from_device_bus_id>-<to_device_bus_id>
Where:
-e or --online
sets the device online.
-d or --offline
sets the device offline.
-s or --safeoffline
waits until all outstanding I/O requests complete, and then tries to set the device offline. Valid for DASDs only.
-f or --forceonline
forces a boxed device online, if this action is supported by the device driver.
-a <name>=<value> or --attribute <name>=<value>
sets the <name> attribute to <value>.

The available attributes depend on the device type. See the chapter for your device for details about the applicable attributes and values.

Setting the online attribute has the same effect as using the -e or -d options.

<device_bus_id>
identifies 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. Input is converted to lowercase.
<from_device_bus_id>-<to_device_bus_id>
identifies a range of devices. If not all devices in the range exist, the command is limited to the existing ones. If you specify a range with no existing devices, you get an error message.
-h or --help
displays help information for the command. To view the man page, enter man chccwdev.
-v or --version
displays version information for the command.

Examples

  • To set a CCW device 0.0.b100 online issue:
    # chccwdev -e 0.0.b100
  • Alternatively, use -a to set a CCW device 0.0.b100 online. Issue:
    # chccwdev -a online=1 0.0.b100
  • To set all CCW devices in the range 0.0.b200 through 0.0.b2ff online, issue:
    # chccwdev -e 0.0.b200-0.0.b2ff
  • To set a CCW device 0.0.b100 and all CCW devices in the range 0.0.b200 through 0.0.b2ff offline, issue:
    # chccwdev -d 0.0.b100,0.0.b200-0.0.b2ff
  • To set several CCW devices in different ranges and different subchannel sets offline, issue:
    # chccwdev -a online=0 0.0.1000-0.0.1100,0.1.7000-0.1.7010,0.0.1234,0.1.4321
  • To set devices with bus ID 0.0.0192, and 0.0.0195 through 0.0.0198 offline after completing all outstanding I/O requests:
    # chccwdev -s 0.0.0192,0.0.0195-0.0.0198
    If an outstanding I/O request is blocked, the command might wait forever. Reasons for blocked I/O requests include reserved devices that can be released or disconnected devices that can be reconnected.
    1. Try to resolve the problem that blocks the I/O request and wait for the command to complete.
    2. If you cannot resolve the problem, issue chccwdev -d to cancel the outstanding I/O requests. The data is lost.
  • To set an ECKD DASD 0.0.b100 online and to enable extended error reporting and logging issue:
    # chccwdev -e -a eer_enabled=1 -a erplog=1 0.0.b100