Changes the characteristics of a device.
chdev -l Name [ -a Attribute=Value ... ] [ -f File ] [ -h ] [ -p ParentName ] [ -P | -T ] [ -U ][ -q ] [ -w ConnectionLocation ] [ -g ]
The chdev command changes the characteristics of the specified device with the given device logical name that is specified with the -l Name flag. The device can be in the Defined, Stopped, or Available state. Some changes may not be allowed when the device is in the Available state. When changing the device characteristics, you can supply the flags either on the command line or in the specified -f File flag.
When the -P, -U, and -T flags are not specified, the chdev command applies the changes to the device and updates the database to reflect the changes. If the -P flag is specified, only the database is updated to reflect the changes, and the device is left unchanged. This is useful in cases where a device cannot be changed because it is in use. In cases where the device is in use, the changes can be made to the database with the -P flag, and the changes will be applied to the device when the system is restarted.
If the –U flag is specified, the database is updated to reflect the changes, and the device is changed while the device remains in the Available state. This option is applicable only to attributes that can be updated while the device is in the Available state. When the –U flag is specified the database is updated with the attributes that are provided with the –U flag and the device is changed to the current values of all attributes that can be updated while the device is in the Available state. See the lsattr command to determine whether the device supports this attribute type.
The -T flag is used to make a temporary change in the device without the change being reflected in the database.The device temporary reverts to the characteristics that are described in the database when the system is restarted. All devices do not support the -P, -U, and -T flags. If a device is in the Defined state, changes are applied only to the database.
You can use the Devices application in Web-based System Manager (wsm) or the System Management Interface Tool (SMIT) smit chdev fast path to change device characteristics.
Item | Description |
---|---|
-a Attribute=Value | Specifies the device attribute-value pairs used for changing specific attribute values. The Attribute=Value parameter can use one attribute value pair or multiple attribute value pairs for one -a flag. If you use an -a flag with multiple attribute value pairs, the list of pairs must be enclosed in quotes with spaces between the pairs. For example, entering -a Attribute=Value lists one attribute value pair per flag, while entering -a 'Attribute1=Value1 Attribute2=Value2' lists more than one attribute value pair. |
-f File | Reads the necessary flags from the named File parameter. |
-g | Forces the change operation to take place on a locked device. |
-h | Displays the command usage message. |
-l Name | Specifies the device logical name in the Customized Devices object class whose characteristics are to be changed. |
-P | Changes the device's characteristics permanently in the Customized Devices object class without actually changing the device. This is useful for devices that cannot be made unavailable and cannot be changed while in the available state. The change is made to the database, and the changes are applied to the device when the system is rebooted. This flag cannot be used with the -T flag. Not all devices support the -P flag. |
-p ParentName | Specifies the new device logical name of the parent device in the Customized Devices object class. Use this flag only when changing the parent of the device. Not all devices support the -p flag. |
-q | Suppresses the command output messages from standard output and standard error. |
-T | Changes the characteristics of the device temporarily without changing the Customized Devices object class for the current start of the system. This flag cannot be used with the -P flag. Not all devices support the -T flag. |
-U | Changes the characteristics of the device while allowing the device to remain in the Available state. This flag cannot be used with the -P or -T flag. Not all devices and attributes support the -U flag. |
-w ConnectionLocation | Specifies the new connection location of the device on the parent. Use this flag only when changing the connection location of the device. Not all devices support the -w flag. |
Access Control
Only the root user and members of the security group should have execute (x) access to this command.
Auditing Events
Auditing Event | Information |
---|---|
DEV_Change | Parameters to the method the cfgmgr command calls. |
Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.
chdev -l rmt0 -a ret=no
The system displays a message
similar to the following: rmt0 changed
chdev -l tok0 -f changattr
The system displays a message similar to the following: tok0 changed
chdev -l scsi0 -a id=6 -P
The system displays a message similar to the following: scsi0 changed
To apply the change to the adapter, shutdown
and restart the system.chdev -l tty11 -p sa5 -w 0
The system displays a message
similar to the following: tty11 changed
chdev -l sys0 -a maxuproc=100
The system displays a message similar to the following: sys0 changed
chdev -l en2 -a delalias4=10.3.4.3
The system displays a message similar to the following: en2 changed
chdev -l en3 -a delalias6=fe80::20b4:40ff:fe00:f016/64
The system displays a message similar to the following: en3 changed
chdev -l fscsix -a dyntrk=yes
chdev -l fscsix -a fc_err_recov=fast_fail
Item | Description |
---|---|
/usr/sbin/chdev | Specifies the command file. |