Selecting devices and device drivers

SUSE Linux Enterprise Server 15 SP5 LPAR mode z/VM guest KVM guest

You can select devices by type and ID, by state, by path, or by network interface name.

About this task

You can select either devices or device drivers.

To select a device driver, specify the --type option and a <type> without a device ID. For details, see the description of <type> and the --type option.

Figure 1. Selecting a device driver

1  chzdev   <type>  --type

Select devices by device ID, by attribute, interface, node, or path. Then restrict your choice to the devices with a particular configuration state. For details see the descriptions for the --configured, --existing, --online, and --offline options. To select all devices, specify --all.

Figure 2. Selecting a device

1  chzdev?   <type>
1+ ,
1 <device>
1 <from_device>-<to_device>
1+   
1  --by-attrib <attribute=value> |  <attribute!=value>
1  --by-interface <interface>
1  --by-node <device_node>
1  --by-path <path>
1  --all
3 ?  --configured?  --existing
1  --online
1  --offline
Device driver selection:
<type>
restricts the scope of an action to the specified device type. Specify a device type together with the --type option to manage the configuration of the device driver itself.
-t <device_type> or --type <device_type>
selects a device type as target for a configuration or query action. For example: dasd-eckd, zfcp, or qeth.
Device selection:
<type>
restricts the scope of an action to the specified device type. Specify a device type and optionally a device ID to only work on devices with matching type and ID
Note:
As a precaution, use the most specific device type when configuring a device by ID. Otherwise the same device ID might accidentally match other devices of a different sub-type. To get a list of supported device types, use the --list-types option.
<device>
selects a single device or a range of devices by device ID. Separate multiple IDs or ranges with a comma (,). To select a range of devices, specify the ID of the first and the last device in the range separated by a hyphen (-).
--all
selects all existing and configured devices.
--by-attrib <attrib=value> | <attrib!=value>
selects devices with a specific attribute, <attrib> that has a value of <value>. When specified as <attrib>!=<value>, selects all devices that do not provide an attribute named <attrib> with a value of <value>.
Tip: You can use the --list-attributes option to display a list of available attributes and the --help-attribute to get more detailed information about a specific attribute.
--by-interface <interface>
selects devices by network interface, for example, eth0. <interface> must be the name of an existing networking interface.
--by-node <device_node>
selects devices by device node, for example, /dev/sda. <device_node> must be the path to the device node for a block device or character device.
Note: If <device_node> is the device node for a logical device (such as a device mapper device), lszdev tries to resolve the corresponding physical device nodes. The lsblk tool must be available for this resolution to work.
--by-path <path>
selects devices by file-system path, for example, /usr. The <path> parameter can be the mount point of a mounted file system, or a path on that file system.
Note: If the file system that provides <path> is stored on multiple physical devices (such as supported by btrfs), lszdev tries to resolve the corresponding physical device nodes. The lsblk tool must be available and the file system must provide a valid UUID for this resolution to work.
Restrict selection to configuration state:
--configured
narrows the selection to those devices for which a persistent configuration exists.
--existing
narrows the selection to all devices that are present in the active configuration.
--configured --existing
specifying both --configured and --existing narrows the selection to devices that are present in both configurations, persistent and active.
--online
narrows the selection to devices that are enabled in the active configuration.
--offline
narrows the selection to devices that are disabled in the active configuration.

Examples

In the following examples the enable and disable actions are used when illustrating the different methods of selecting devices.
  • To enable device 0.0.8000 by type and ID, issue:
    # chzdev dasd-fba 0.0.8000 --enable
    FBA DASD 0.0.8000 configured
  • To select a device by ID only, issue the following command to disable device 0.0.8000. In this case chzdev automatically determines the associated type:
    # chzdev 0.0.8000 --disable
    FBA DASD 0.0.8000 deconfigured
    Note: This addressing mode might result in multiple devices being selected. For example, if an FBA DASD is part of the persistent configuration, but you have disabled it and defined a new ECKD DASD 0.0.8000 that is active, and you enable 0.0.8000, both the FBA and the ECKD device will be enabled. The same is true if you specify only "dasd" and not "dasd-fba".
    Tip: To ensure that you enable the correct device, include the most specific type, for example dasd-eckd instead of just dasd.
  • To select multiple devices by range, specify the beginning of the range, a hyphen, and the end of the range:
    # chzdev dasd-eckd 0.0.3000-0.0.4000 --enable
    ECKD DASD 0.0.3718 configured
    ECKD DASD 0.0.3719 configured
    ECKD DASD 0.0.371a configured
    ECKD DASD 0.0.37b8 configured
    ECKD DASD 0.0.37b9 configured
    ECKD DASD 0.0.37be configured
    ECKD DASD 0.0.37bf configured
  • To narrow the selection by configuration state, for example "online", use the --online option. This example configures all devices that are enabled in the active configuration persistently:
    # chzdev  --persistent --online --enable
    Configuring devices in the persistent configuration only
    ECKD DASD 0.0.3718 configured
    ECKD DASD 0.0.3719 configured
    ECKD DASD 0.0.371a configured
    ECKD DASD 0.0.37b8 configured
    ECKD DASD 0.0.37b9 configured
    ECKD DASD 0.0.37be configured
    ECKD DASD 0.0.37bf configured
    FBA DASD 0.0.8000 configured
    FCP device 0.0.1940 configured
    Note: NPIV mode disabled - LUNs must be configured manually
    zFCP LUN 0.0.1940:0x500507630508c1ae:0x402140ac00000000 configured
    QETH device 0.0.f5f0:0.0.f5f1:0.0.f5f2 configured
    Generic CCW device 0.0.0009 configured
  • To select devices by specifying a file system path that is located on the target device, use the --by-path option:
    # chzdev --persistent --by-path /mnt --enable
    Configuring devices in the persistent configuration only
    ECKD DASD 0.0.3718 configured
  • To select a device by specifying a device node that refers to a block or character device:
    # chzdev --persistent --by-node /dev/dasda1 --enable 
    Configuring devices in the persistent configuration only
    ECKD DASD 0.0.3718 configured