Setting a device online or offline

Red Hat Enterprise Linux 9.2 LPAR mode z/VM guest

Use the online device group attribute to set a device online or offline.

Procedure

To set a qeth group device online, set the online device group attribute to 1. To set a qeth group device offline, set the online device group attribute to 0.
Issue a command of the form:
# chzdev -a <device_bus_id> online=<flag>
or, using sysfs:
# echo <flag> > /sys/bus/ccwgroup/drivers/qeth/<device_bus_id>/online
Setting a device online associates it with an interface name.

Setting a device offline closes this network device. If IPv6 is active, you lose any IPv6 addresses set for this device. After you set the device online, you can restore lost IPv6 addresses only by issuing the ip or ifconfig commands again.

Example

To set a qeth device with bus ID 0.0.a100 online issue:
# chzdev -a 0.0.a100 online=1
or, using sysfs:
# echo 1 > /sys/bus/ccwgroup/drivers/qeth/0.0.a100/online
To set the same device offline issue:
# chzdev -a 0.0.a100 online=0
or, using sysfs:
# echo 0 > /sys/bus/ccwgroup/drivers/qeth/0.0.a100/online