rmdev command
Purpose
Removes a device from the system.
Syntax
rmdev { -dev | -pdev } Name [ -recursive ] [ -ucfg ] [ -f ]
Description
The rmdev command unconfigures and undefines the device that is specified with the device logical name. If you specify the -recursive flag, the rmdev command acts on any children of the device as well. By specifying the -ucfg flag the device is unconfigured but not undefined.
Use the -pdev flag along with the parent device's logical name to delete all of the children devices. The children are deleted in the same recursive fashion as mentioned in the preceding description for the -recursive flag. The only difference is that the specified device itself is not deleted. Thus, the -recursive flag is redundant and need not be specified with the -pdev flag.
Flags
Flag name | Description |
---|---|
-dev Name | Specifies the logical device, indicated by the Name parameter. This flag might not be used with the -pdev flag. |
-pdev Name | Specifies the parent logical device (indicated by the Name parameter whose children need to be removed. This flag may not be used with the -dev flag. |
-recursive | Unconfigures the device and its children. |
-ucfg | Unconfigures, but does not undefine the specified device. The device's state is moved from
Available to Defined . To move the device back to
Available state run cfgdev -dev Name command. |
-f | Forcefully removes or unconfigures the device even if it is in use. Note: This
option can be used only with physical volumes in cluster environment, where the device is not used
in the active cluster of the system.
|
Exit Status
Examples
- To unconfigure the cd0 CD-ROM device, type the following
command:
rmdev -dev cd0
- To unconfigure the SCSI adapter scsi1 and all of its children,
type the following command:
rmdev -recursive -dev scsi1
- To unconfigure just the children of the SCSI adapter scsi1,
but not the adapter itself, type the following command:
rmdev -pdev scsi1
- To unconfigure the children of PCI bus pci1 and all other devices
under them, type the following command:
rmdev -pdev pci1
- To remove the suspended virtual adapter and
all the children, type the following command:
rmdev -dev susadpt0 -recursive
The system displays the following output:vtscsi0 deleted client_rootvg deleted susadpt0 deleted
rmdev -dev en0
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.