Sun Java Solaris Communities My SDN Account Join SDN
 
Documentation

DRIVER DEVELOPMENT - cfgadm extensions to support SCSI hotplugging

I Feature Desciption

  • Add new SCSI devices to system without rebooting
  • Replace failed SCSI devices with a similar device without rebooting system
  • Remove failed SCSI devices from system without rebooting.
  • Configure and unconfigure SCSI devices

II How is this feature accessed?

  • Through the cfgadm(1M) command.
  • Refer to the cfgadm(1M) man page for background information on the generic cfgadm command.
  • Refer to the cfgadm_scsi(1M) man page for information on SCSI specific hotplugging facilities available through cfgadm.

III Background

  • cfgadm(1M) is an existing Solaris command for hotplugging. It has been extended to support SCSI hotplugging.
  • cfgadm uses the concept of attachment points to denote locations in the system where hotplugging may occur.
  • Not all SCSI devices support hotplugging through the cfgadm command. Attachment points must be exported by the drivers for SCSI devices which do support hot plugging through cfgadm.
  • SCSI devices may support hotplugging through commands other than cfgadm. This description focuses only on support for hotplugging through cfgadm. In this document, the term SCSI devices/controllers refers only to those SCSI devices which support hotplugging through cfgadm.

Back to Top



IV Supported operations

Different sets of operations are supported depending on whether the command is invoked on a SCSI device or controller.

The following operations are supported for SCSI Controllers:

List - List SCSI controllers in the system which support hotplugging through cfgadm.

EXAMPLE:

# cfgadm -l
Ap_Id  Type Receptacle  Occupant  Condition
c1  scsi-bus connected  configured  unknown

Disconnect - Suspend all I/O activity on the SCSI bus. This operation may not be supported by all SCSI controllers. This command may be used for operations like replacing SCSI cables. This command must be used with caution as suspending I/O to disks containing critical partitions like /, /usr, swap and /var may cause system hang and require a reboot to correct.

EXAMPLE:

# cfgadm -c disconnect c1
WARNING: Disconnecting critical partitions may cause system hang.
Continue (yes/no)? y

Connect - Resume I/O activity on the SCSI bus.

EXAMPLE:

# cfgadm -c connect c1


Configure - Configure new devices on the SCSI bus. SCSI devices which have been specifically unconfigured through the device unconfigure subcommand cannot be reconfigured through this subcommand. Use the device configure subcommand (see below) instead.

EXAMPLE:

# cfgadm -c configure c1

Unconfigure - Unconfigure all devices on the SCSI bus.

EXAMPLE:

# cfgadm -c unconfigure c1


Insert device - Adds a device to the SCSI bus. This command can only be used interactively.

EXAMPLE:

# cfgadm -x insert_device c1
Adding device to SCSI HBA: /devices/sbus@3,0/SUNW,fas@3,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

Reset bus - Reset bus without resetting all devices on the SCSI bus. This operation may not be supported by all hardware.

EXAMPLE:

# cfgadm -x reset_bus c1


Reset all - Reset bus and all devices on the SCSI bus. This operation may not be supported by all hardware.

EXAMPLE:

# cfgadm -x reset_all c1

Back to Top


The following operations are supported for SCSI Devices.

List - List SCSI devices in the system which support hotplugging through cfgadm. This information is not displayed in the default listing. The -a option must be used with the -l flag to display SCSI devices.

EXAMPLE:

# cfgadm -al

Ap_Id  Type Receptacle Occupant  Condition
c1 scsi-bus connected  configured  unknown
c1::dsk/c1t6d0  unavailable  connected  configured  unknown
c1::rmt/0 tape  connected  configured  unknown


Unconfigure - Unconfigure a specific SCSI device

EXAMPLE:

# cfgadm -c unconfigure c1::dsk/c1t6d0

Configure - configure a specific device.

EXAMPLE:

# cfgadm -c configure c1::dsk/c1t6d0

Back to Top


Replace device - Replace a SCSI device with another device of the same kind. This command can only be used interactively. This operation may not be supported by all hardware.

EXAMPLE:

# cfgadm -x replace_device c1::dsk/c1t6d0
Replacing SCSI device: /devices/sbus@3,0/SUNW,fas@3,8800000/sd@6,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

Remove device - Remove a specific device. This command can only be used interactively. This operation may not be supported by all hardware.

EXAMPLE:

# cfgadm -x remove_device c1::rmt/0
Removing SCSI device: /devices/sbus@3,0/SUNW,fas@3,8800000/st@5,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

Reset device - reset a specific SCSI device. This operation may not be supported by all hardware.

EXAMPLE:

# cfgadm -x reset_device c1::dsk/c1t6d0

NOTES

  • If incorrectly used, the disconnect operation  may cause a system hang. It should not be used to quiesce the SCSI bus to which disks containing /, /usr, swap and /var are connected.
  • Not all of the above operations are supported by all hardware. Some SCSI controllers/devices may support only a subset of the above operations and some cannot be hotplugged with cfgadm at all.

Back to Top