20.10. Dynamically adding a qeth device
You can dynamically add a qeth device to the system to make a new network interface available without rebooting. Adding devices dynamically supports maintaining connectivity and expanding capacity on running systems.
Procedure
Determine whether the
qethdevice driver modules are loaded. The following example shows loadedqethmodules:# 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 qethIf the output of the
lsmodcommand shows that theqethmodules are not loaded, run themodprobecommand to load them:# modprobe qethUse the
cio_ignoreutility 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_idReplace 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 is0.0.f501, and the data_device_bus_id is0.0.f502:# cio_ignore -r 0.0.f500,0.0.f501,0.0.f502Use 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 qethSelect 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)Optional: 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
encf500network interface. Alternatively, you can usesysfsattributes to set the device online as follows:Create a
qethgroup device:# echo read_device_bus_id,write_device_bus_id,data_device_bus_id > /sys/bus/ccwgroup/drivers/qeth/groupFor example:
# echo 0.0.f500,0.0.f501,0.0.f502 > /sys/bus/ccwgroup/drivers/qeth/groupNext, verify that the
qethgroup device was created properly by looking for the read channel:# ls /sys/bus/ccwgroup/drivers/qeth/0.0.f500You 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
-
Bring the device online by writing
1to the onlinesysfsattribute:# echo 1 > /sys/bus/ccwgroup/drivers/qeth/0.0.f500/onlineThen verify the state of the device:
# cat /sys/bus/ccwgroup/drivers/qeth/0.0.f500/online 1A return value of
1indicates that the device is online, while a return value0indicates that the device is offline.Find the interface name that was assigned to the device:
# cat /sys/bus/ccwgroup/drivers/qeth/0.0.f500/if_name encf500Now you can continue to configure the
encf500network interface.The following command from the s390utils package shows the most important settings of your
qethdevice:# 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