chzdev(8) | chzdev | chzdev(8) |
chzdev - Configure z Systems specific devices
chzdev TYPE DEVICE [ SELECTION SETTINGS ACTIONS OPTIONS ]
chzdev is a tool for configuring devices and device drivers which are specific to the IBM z Systems platform. Supported device types include storage devices (DASD and zFCP) and networking devices (QETH, CTC and LCS).
You can apply configuration changes to the active configuration of the currently running system, or to the persistent configuration stored in configuration files:
By default chzdev applies changes to both the active and the persistent configuration.
chzdev supports multiple tool actions such as
You can trigger these actions by specifying one of the command line options listed in the ACTIONS section.
chzdev uses device type names to distinguish devices by their respective type. A device type typically corresponds to a device driver, though there are cases where multiple device types are provided for the same driver (for example both device types "dasd-eckd" and "dasd-fba" are related to the DASD device driver).
You can use the TYPE positional argument of the chzdev tool to restrict the scope of a tool action to the specified device type:
Note: Specify the full device type when configuring a device by ID. Otherwise the same device ID might accidentally match other devices of a different type.
To get a list of supported device types, use the --list-types action.
Use the DEVICE positional argument of chzdev to select a single device or a range of devices by device ID as target for a tool action. To select a range of devices, specify the ID of the first and the last device in the range separated by a hyphen (-). Separate multiple IDs or ranges with a comma (,).
Example: chzdev dasd 1000,2000-2010
-e
In addition to specifying devices by their ID you can also select devices by their state or by the Linux functions they provide.
chzdev supports the following device states:
Selection works in two stages:
Select devices with specified attribute value.
When specified as KEY=VALUE, selects all devices that provide an attribute named KEY with a value of VALUE. When specified as KEY!=VALUE, selects all devices that don't provide an attribute named KEY with a value of VALUE.
The NAME parameter must be the name of an existing networking interface.
The NODE parameter must be the path to a block device or character device special file.
Note: If NODE is the device node for a logical device (such as a device mapper device), chzdev will try to resolve the corresponding physical device nodes. The lsblk(8) tool must be available for this resolution to work.
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 or on a subvolume (such as supported by btrfs) chzdev will try to resolve the corresponding physical device nodes. The lsblk(8) and findmnt(8) tools must be available and in the case of multiple physical devices the file system must provide a valid UUID for this resolution to work.
An online device is a device in the active configuration that is set up to provide its associated Linux function (such as a block device or networking interface).
An offline device is a device in the active configuration that is not set up to provide its associated Linux function.
A failed device is a device for which its driver detected an error condition that may cause the device to not correctly perform its function. You can use the --info option of the lszdev tool to get more details on the detected errors.
Example: lszdev --failed --info
A setting is a positional argument of chzdev in the form KEY=VALUE. It can be used to configure a specific named attribute (KEY) of a device or device type with the provided VALUE.
Example: chzdev dasd 1000
use_diag=1
You can use the --list-attributes option to display a list of available attributes and --help-attribute to get more detailed information about a specific attribute.
The following special settings affect how devices are handled by chzdev:
zdev:early=0|1
Specify a value of 1 for this attribute in any of the following situations:
You can use one of the action options listed below to specify the main tool action that chzdev should perform. Alternatively you can specify a setting or one of --remove or --remove-all to modify device and device type settings.
Applies the persistent configuration of all selected devices and device types to the active configuration.
Active configuration: Disables the selected devices by reverting the configuration steps necessary to enable a device.
Persistent configuration: Removes configuration files and settings associated with the selected device.
The enable action instructs chzdev to perform any steps necessary for the selected devices to provide their corresponding Linux function (such as a block device or networking interface). Examples for such steps include setting a CCW device online, removing a CCW device from the CIO blacklist, and creating a CCW group device.
Active configuration: Performs all initial setup steps required for a device to provide its Linux function.
Persistent configuration: Creates configuration files and settings associated with the selected devices.
Writes configuration data for all selected devices and device types to FILENAME. If a single hyphen ("-") is specified instead of an actual file name, data is written to the standard output stream.
The output format of this action is suitable for use with the --import action of chzdev.
Displays detailed information about the attributes specified as positional command line arguments. Information displayed includes a description of the attribute function and optionally a list of accepted values and the default value.
Reads configuration data from FILENAME and applies it. If a single hyphen ("-") is specified as FILENAME data is read from the standard input stream. The input format must be either in the format as produced by the chzdev --export action, or in the format of a machine-provided I/O configuration data file.
Machine-provided data: Some machine models provide I/O configuration data which is made available by the Linux kernel via a sysfs interface. While this data is intended for automatic consumption during the boot phase, you can also apply it manually using the --import action like in the following example
Example: chzdev --import /sys/firmware/sclp_sd/config/data
Note: By default all configuration data that is read is also applied. To reduce the scope of imported configuration data, you can select specific devices, a device type, or define whether only data for the active, persistent or auto-configuration should be imported.
Lists all supported device or device type attributes, including a short description. You can use the --help-attribute action to get more detailed information about an attribute.
Lists the name and a short description for all device types supported by chzdev.
Restricts configuration changes to the active configuration. As a result, the persistent configuration is not changed unless --persistent was also specified.
Note: Changes to the active configuration are effective immediately. They are lost on reboot, or when a device becomes unavailable, or when a device driver is unloaded.
This option is used internally to apply machine-provided I/O configuration data to a Linux system.
Note: There is typically no need for users to specify this option directly. In particular, user-initiated changes to this configuration will be lost the next time that machine-provided data is obtained (i.e. during boot).
If PATH is specified without an equal sign (=), it is used as base path for accessing files in the active and persistent configuration.
If the specified parameter is in KEY=VALUE format, only those paths that begin with KEY are modified. For these paths, the initial KEY portion is replaced with VALUE.
Example: chzdev -dasd-eckd 1000 -e -p
--base /etc=/mnt/etc
Performs action processing and displays tool output without changing the configuration of any devices or device types. When combined with --verbose, details about skipped configuration steps are displayed.
Overrides safety checks and confirmation questions. These checks include:
Skips any additional steps that are required to make changes to the root device configuration persistent. Typically such steps include rebuilding the initial RAM disk, or modifying the kernel command line.
Skips all calls to the udevadm tool that are intended to wait for udev to finish processing before continuing. There is typically no need to use this option unless chzdev is run in an environment where udev is not fully functional (such as in the early phase of an initial RAM disk).
The persistent configuration is put into effect when the system boots, or when a device becomes available, or when a device driver is loaded.
Persistent configuration: Removes any setting for the specified attribute. As a result, the attribute will keep its initial value when the device or device type is configured.
Active configuration: For attributes that maintain a list of values written to them, clears all values for that list.
Note: Some attributes are mandatory and cannot be removed.
Persistent configuration: Removes all non-mandatory attribute settings. As a result, these attributes will keep their initial value when the device or device type is configured.
Active configuration: For all attributes that maintain a list of values written to them, clears all values for that list.
Note: Some attributes are mandatory and cannot be removed.
Enable DASD 0.0.8000 and create persistent configuration:
Enable zFCP LUN and create persistent configuration:
Enable QETH device without creating a persistent configuration:
Get help on QETH device attribute:
Change dasd device type parameter:
Remove persistent use_diag setting of dasd 0.0.8000:
Export configuration data for all zFCP LUNs to file.
Persistently configure root device:
Disable device that provides networking interface eth0:
lszdev(8), lscss(8), lsdasd(8), lszfcp(8), lsqeth(8), lsblk(8).
Jan 2016 | s390-tools |