chdev command

Purpose

Changes the characteristics of a device.

Syntax

chdev -dev Name [-perm ] -attr Attribute=Value... [-restoreroute] [-force]

Description

The chdev command changes the characteristics of the device that is specified with the given device logical name (the -dev Name flag). Some changes might not be allowed when the device is in the Available state.

When the -perm flag is not specified, the chdev command applies the changes to the device and updates the database to reflect the changes. If the -perm flag is specified, only the database is updated to reflect the changes, and the device itself is left unchanged. This is useful in cases where a device cannot be changed because it is in use; in which case, the changes can be made to the database with the -perm flag, and the changes are applied to the device when the system is restarted. Not all devices support the -perm flag.

Attention: To protect the Configuration database, the chdev command is not interruptible. To stop this command before execution is complete might result in a corrupted database.

The lldpsvc attribute is added to the shared Ethernet adapter (SEA) device for an automated virtual network port configuration and management in the Hardware Management Console (HMC) Version 7 Release 7.7.0, or later. The lldpsvc attribute activates the virtual server network (VSN) capability on the SEA when you set the attribute to yes. The VSN capability can be enabled on the HMC. The default value of the lldpsvc attribute is no. This attribute must be set to no before you remove the SEA.

Flags

Flag name Description
-attr Attribute=Value Specifies the device attribute value pairs that are used for changing specific attribute values. The Attribute=Value parameter can use one attribute value pair or multiple attribute value pairs for one -attr flag. If you use an -attr flag with multiple attribute value pairs, the list of pairs must be separated by spaces. For example, entering -attr Attribute=Value lists one attribute value pair per flag, while entering -attr Attribute1=Value1 Attribute2=Value2 lists more than one attribute value pair.
-dev Name Specifies the device logical name, indicated by the Name parameter, whose characteristics are to be changed.
-force Forcefully attempts to change the device attribute.
Note: Currently, it supports network interface and inet0 family.
-perm Changes the characteristics of the device permanently without changing the device. This is useful for devices that cannot be made unavailable and cannot be changed while in the available state. By restarting the system, the changes are applied to the device. Not all devices support the -perm flag.
-restoreroute Restores routes.
Note: You cannot change attributes of the interface or the inet0 family that is used for the cluster communication. You can change the attributes by using the force option. However, this action can adversely affect the membership of the cluster.

Exit Status

See Exit status for Virtual I/O Server commands.

Examples

  1. To change the retention instructions of the 4 mm SCSI tape drive rmt0 so that the drive does not move the tape to the beginning, then to the end, and then back to the beginning each time that a tape is inserted or the drive is powered on, type the command as follows:
    chdev -dev rmt0 -attr ret=no
  2. To change the SCSI ID of the available SCSI adapter scsi0 that cannot be made unavailable or changed due to available disk drives connected to it, type:
    chdev  -dev scsi0 -attr id=6 -perm
    To apply the change to the adapter, shutdown and restart the system.
  3. To restore the route, type the command as follows:
    chdev  -restoreroute
Note: If you attempt to change a route by typing the following command when it is in use for the cluster communication, the system displays an error message:
chdev -dev inet0 -attr route="net,-hopcount,0,,0,9.126.85.2"
The system displays the following error message with return code 78:
The requested operation is not allowed because partition is a member of "test_cluster" cluster.
Interface being used is "en0" ("inet" Family) for cluster communication.