The following section describes various SCSI hot plugging tasks with the cfgadm command.
The procedures in this section use specific devices as examples to illustrate how to use the cfgadm command to hot plug SCSI components. The device information that you supply, and is displayed with the cfgadm command, depends on your system configuration.
SCSI controllers c0 and c1 and the devices attached to them provide examples of the type of device configuration information that can be displayed with the cfgadm command.
If the SCSI device is not supported by the cfgadm command, it does not display in the cfgadm command output.
Become superuser.
Display information about attachment points on the system.
# cfgadm -l Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c1 scsi-bus connected configured unknown |
In this example, c0 and c1 represent two SCSI controllers.
Display information about a system's SCSI controllers and their attached devices.
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 disk connected configured unknown c0::rmt/0 tape connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t3d0 disk connected configured unknown c1::dsk/c1t4d0 unavailable connected unconfigured unknown |
The cfgadm -l commands displays info about SCSI HBAs but not SCSI devices. Use the cfgadm -al command to display information about SCSI devices such as disk and tapes.
In the following examples, only SCSI attachment points are listed. The attachment points displayed on your system will depend on your system configuration.
SCSI controller c1 provides an example of unconfiguring a SCSI controller.
Become superuser.
Unconfigure a SCSI controller.
# cfgadm -c unconfigure c1 |
Verify the SCSI controller is unconfigured.
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 disk connected configured unknown c0::rmt/0 tape connected configured unknown c1 scsi-bus connected unconfigured unknown |
Notice that the Occupant column specifies unconfigured, indicating that the SCSI bus has no configured occupants.
SCSI controller c1 provides an example of configuring a SCSI controller.
Become superuser.
Configure a SCSI controller.
# cfgadm -c configure c1 |
Verify the SCSI controller is configured.
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 disk connected configured unknown c0::rmt/0 tape connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t3d0 disk connected configured unknown c1::dsk/c1t4d0 unavailable connected unconfigured unknown |
The previous unconfigure procedure removed all devices on the SCSI bus. Now all the devices are configured back into the system.
SCSI disk c1t4d0 provides an example of configuring a SCSI device.
Become superuser.
Identify the device to be configured.
cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 disk connected configured unknown c0::rmt/0 tape connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t3d0 disk connected configured unknown c1::dsk/c1t4d0 unavailable connected unconfigured unknown |
Configure a specific SCSI device.
# cfgadm -c configure c1::dsk/c1t4d0 |
Verify the SCSI device is configured.
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 disk connected configured unknown c0::rmt/0 tape connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t3d0 disk connected configured unknown c1::dsk/c1t4d0 disk connected configured unknown |
Disconnecting a SCSI device must be done with caution, particularly when dealing with controllers for disks containing critical file systems such as root (/), usr, var, and the swap partition. The dynamic reconfiguration software cannot detect all cases where a system hang may result. Use this command with caution.
SCSI controller c1 provides an example of disconnecting a SCSI device.
Become superuser.
Verify the device is connected before disconnecting it.
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 disk connected configured unknown c0::rmt/0 tape connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t3d0 disk connected configured unknown c1::dsk/c1t4d0 disk connected configured unknown |
Disconnect a SCSI controller.
# cfgadm -c disconnect c1 WARNING: Disconnecting critical partitions may cause system hang. Continue (yes/no)? y |
This command suspends all I/O activity on the SCSI bus until the cfgadm -c connect command is used. The cfgadm command does some basic checking to prevent critical partitions from being disconnected, but it cannot detect all cases. Inappropriate use of this command may result in a system hang and could require a system reboot.
Verify the SCSI bus is disconnected.
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 disk connected configured unknown c0::rmt/0 tape connected configured unknown c1 unavailable disconnected configured unknown c1::dsk/c1t10d0 unavailable disconnected configured unknown c1::dsk/c1t4d0 unavailable disconnected configured unknown |
The controller and all the devices attached to it are disconnected from the system.
SCSI controller c1 provides an example of connecting a SCSI controller.
Become superuser.
Verify the device is disconnected before connecting it.
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 disk connected configured unknown c0::rmt/0 tape connected configured unknown c1 unavailable disconnected configured unknown c1::dsk/c1t10d0 unavailable disconnected configured unknown c1::dsk/c1t4d0 unavailable disconnected configured unknown |
Connect a SCSI controller.
# cfgadm -c connect c1 |
Verify the SCSI controller is connected.
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 disk connected configured unknown c0::rmt/0 tape connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t3d0 disk connected configured unknown c1::dsk/c1t4d0 disk connected configured unknown |
SCSI controller c1 provides an example of how to add a SCSI device to a SCSI bus.
When adding devices, the ap_id of the SCSI HBA (controller) to which the device is attached is specified, not the ap_id of the device itself.
Become superuser.
Identify the current SCSI configuration.
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 disk connected configured unknown c0::rmt/0 tape connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t3d0 disk connected configured unknown |
Add a SCSI device to a SCSI bus.
# cfgadm -x insert_device c1 Adding device to SCSI HBA: /devices/sbus@1f,0/SUNW,fas@1,8800000 This operation will suspend activity on SCSI bus: c1 Continue (yes/no)? y SCSI bus quiesced successfully. It is now safe to proceed with hotplug operation. Enter y if operation is complete or n to abort (yes/no)? y |
Type y at the Continue (yes/no)? prompt to proceed.
I/O activity on the SCSI bus will be suspended while the hot-plug operation is in progress.
Connect the device and then power it on.
Type y at the Enter y if operation is complete or n to abort (yes/no)? prompt after the new device has been inserted.
Verify the device has been added.
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 disk connected configured unknown c0::rmt/0 tape connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t3d0 disk connected configured unknown c1::dsk/c1t4d0 disk connected configured unknown |
A new disk has been added to controller c1.
SCSI disk c1t4d0 provides an example of replacing an identical device on a SCSI controller.
Become superuser.
Identify the current SCSI configuration.
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 disk connected configured unknown c0::rmt/0 tape connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t3d0 disk connected configured unknown c1::dsk/c1t4d0 disk connected configured unknown |
Replace a device on the SCSI bus with another device of the same type.
# cfgadm -x replace_device c1::dsk/c1t4d0 Replacing SCSI device: /devices/sbus@1f,0/SUNW,fas@1,8800000/sd@4,0 This operation will suspend activity on SCSI bus: c1 Continue (yes/no)? y SCSI bus quiesced successfully. It is now safe to proceed with hotplug operation. Enter y if operation is complete or n to abort (yes/no)? y |
Type y at the Continue (yes/no)? prompt to proceed.
I/O activity on the SCSI bus will be suspended while the hot-plug operation is in progress.
Power off the device to be removed and remove it. Add the replacement device, which should be of the same type and at the same address (target and lun) as the device to be removed. Then power it on.
Type y at the Enter y if operation is complete or n to abort (yes/no)? prompt after the device has been replaced.
Verify the device has been replaced.
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 disk connected configured unknown c0::rmt/0 tape connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t3d0 disk connected configured unknown c1::dsk/c1t4d0 disk connected configured unknown |
SCSI disk c1t4d0 provides an example of removing a device on a SCSI controller.
Become superuser.
Identify the current SCSI configuration.
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 disk connected configured unknown c0::rmt/0 tape connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t3d0 disk connected configured unknown c1::dsk/c1t4d0 disk connected configured unknown |
Remove a SCSI device from the system.
# cfgadm -x remove_device c1::dsk/c1t4d0 Removing SCSI device: /devices/sbus@1f,0/SUNW,fas@1,8800000/sd@4,0 This operation will suspend activity on SCSI bus: c1 Continue (yes/no)? y SCSI bus quiesced successfully. It is now safe to proceed with hotplug operation. Enter y if operation is complete or n to abort (yes/no)? y |
Type y at the Continue (yes/no)? prompt to proceed.
I/O activity on the SCSI bus will be suspended while the hot-plug operation is in progress.
Power off the device to be removed and remove it.
Type y at the Enter y if operation is complete or n to abort (yes/no)? prompt after the device has been removed.
Verify the device has been removed from the system.
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 disk connected configured unknown c0::rmt/0 tape connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t3d0 disk connected configured unknown |
cfgadm: Component system is busy, try again: failed to offline: device path Resource Information ------------------ -------------------------- /dev/dsk/c1t0d0s0 mounted filesystem "/file-system" |
You attempted to remove or replace a device with a mounted file system.
Unmount the file system listed in the error message and try the cfgadm operation again.