Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

System Administration Guide: Devices and File Systems
Previous Next

SCSI Hot-Plugging With the cfgadm Command

This section describes various SCSI hot-plugging procedures that you can perform with the cfgadm command.


Note - The SCSI framework generally supports hot-plugging of SCSI devices. However, you should consult your hardware documentation to confirm whether hot-plugging is supported for your SCSI devices.


These procedures 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 that the cfgadm command displays, depends on your system configuration.

How to Display Information About SCSI Devices

The following procedure uses SCSI controllers c0 and c1 and the devices that are attached to them in the examples of the type of device configuration information that you can display with the cfgadm command.


Note - If the SCSI device is not supported by the cfgadm command, the device does not display in the cfgadm command output.


  1. Become superuser.
  2. 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.

  3. 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

    Note - The cfgadm -l commands displays information about SCSI HBAs but not SCSI devices. Use the cfgadm -al command to display information about SCSI devices such as disk and tapes.


How to Unconfigure a SCSI Controller

The following procedure uses SCSI controller c1 in the example of unconfiguring a SCSI controller.

  1. Become superuser.
  2. Unconfigure a SCSI controller.
    # cfgadm -c unconfigure c1
  3. Verify that 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 for c1 specifies unconfigured, indicating that the SCSI bus has no configured occupants.

    If the unconfigure operation fails, see How to Resolve a Failed SCSI Unconfigure Operation.

How to Configure a SCSI Controller

The following procedure uses SCSI controller c1 in the example of configuring a SCSI controller.

  1. Become superuser.
  2. Configure a SCSI controller.
    # cfgadm -c configure c1
  3. Verify that 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.

How to Configure a SCSI Device

The following procedure uses SCSI disk c1t4d0 in the example of configuring a SCSI device.

  1. Become superuser.
  2. 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
  3. Configure the SCSI device.
    # cfgadm -c configure c1::dsk/c1t4d0
  4. Verify that 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

How to Disconnect a SCSI Controller


Caution - Disconnecting a SCSI device must be done with caution, particularly when you are dealing with controllers for disks that contain critical file systems such as root (/), usr, var, and the swap partition. The dynamic reconfiguration software cannot detect all cases where a system hang might result. Use this procedure with caution.


The following procedure uses SCSI controller c1 in the example of disconnecting a SCSI device.

  1. Become superuser.
  2. Verify that the device is connected before you disconnect 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
  3. Disconnect the SCSI controller.
    # cfgadm -c disconnect c1
    WARNING: Disconnecting critical partitions may cause system hang.
    Continue (yes/no)? y

    Caution - 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 can result in a system hang and could require a system reboot.


  4. Verify that 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/c1t3d0       unavailable   disconnected configured   unknown
    c1::dsk/c1t4d0       unavailable   disconnected configured   unknown

    The controller and all the devices that are attached to it are disconnected from the system.

SPARC: How to Connect a SCSI Controller

The following procedure uses SCSI controller c1 in the example of connecting a SCSI controller.

  1. Become superuser.
  2. Verify that the device is disconnected before you connect 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/c1t3d0       unavailable   disconnected configured   unknown
    c1::dsk/c1t4d0       unavailable   disconnected configured   unknown
  3. Connect the SCSI controller.
    # cfgadm -c connect c1
  4. Verify that 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

SPARC: How to Add a SCSI Device to a SCSI Bus

SCSI controller c1 is used in the example of how to add a SCSI device to a SCSI bus.


Note - When you add devices, you specify the Ap_Id of the SCSI HBA (controller) to which the device is attached, not the Ap_Id of the device itself.


  1. Become superuser.
  2. 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
  3. Add the SCSI device to the SCSI bus.
    1. Type the following cfgadm command.

      For example:

      # cfgadm -x insert_device c1
      Adding device to SCSI HBA: /devices/[email protected],0/SUNW,[email protected],8800000
      This operation will suspend activity on SCSI bus: c1
    2. Type y at the Continue (yes/no)? prompt to proceed.
      Continue (yes/no)? y
      SCSI bus quiesced successfully.
      It is now safe to proceed with hotplug operation.

      I/O activity on the SCSI bus is suspended while the hot-plug operation is in progress.

    3. Connect the device and then power it on.
    4. Type y at the Enter y if operation is complete or n to abort (yes/no)? prompt.
      Enter y if operation is complete or n to abort (yes/no)? y
  4. Verify that 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.

SPARC: How to Replace an Identical Device on a SCSI Controller

The following procedure uses SCSI disk c1t4d0 in the example of replacing an identical device on a SCSI controller.

  1. Become superuser.
  2. 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
  3. Replace a device on the SCSI bus with another device of the same type.
    1. Type the following cfgadm command.

      For example:

      # cfgadm -x replace_device c1::dsk/c1t4d0
      Replacing SCSI device: /devices/[email protected],0/SUNW,[email protected],8800000/[email protected],0
      This operation will suspend activity on SCSI bus: c1
    2. Type y at the Continue (yes/no)? prompt to proceed.

      I/O activity on the SCSI bus is suspended while the hot-plug operation is in progress.

      Continue (yes/no)? y
      SCSI bus quiesced successfully.
      It is now safe to proceed with hotplug operation.
    3. Power off the device to be removed and remove it.
    4. Add the replacement device. Then, power it on.

      The replacement device should be of the same type and at the same address (target and lun) as the device to be removed.

    5. Type y at the Enter y if operation is complete or n to abort (yes/no)? prompt.
      Enter y if operation is complete or n to abort (yes/no)? y
  4. Verify that 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

SPARC: How to Remove a SCSI Device

The following procedure uses SCSI disk c1t4d0 in the example of removing a device on a SCSI controller.

  1. Become superuser.
  2. 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
  3. Remove the SCSI device from the system.
    1. Type the following cfgadm command.

      For example:

      # cfgadm -x remove_device c1::dsk/c1t4d0
      Removing SCSI device: /devices/[email protected],0/SUNW,[email protected],8800000/[email protected],0
      This operation will suspend activity on SCSI bus: c1
    2. Type y at the Continue (yes/no)? prompt to proceed.
      Continue (yes/no)? y
      SCSI bus quiesced successfully.
      It is now safe to proceed with hotplug operation.

      I/O activity on the SCSI bus is suspended while the hot-plug operation is in progress.

    3. Power off the device to be removed and remove it.
    4. Type y at the Enter y if operation is complete or n to abort (yes/no)? prompt.
      Enter y if operation is complete or n to abort (yes/no)? y

    Note - Note: This step must be performed if you are removing a SCSI RAID device from a SCSI RAID array.


  4. Verify that 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

Troubleshooting SCSI Configuration Problems

This section provides error messages and possible solutions for troubleshooting SCSI configuration problems. For more information on troubleshooting SCSI configuration problems, see cfgadm(1M).

Error Message
cfgadm: Component system is busy, try again: failed to offline:
     device-path
          Resource              Information
     ------------------  --------------------------
     /dev/dsk/c1t0d0s0   mounted filesystem "/file-system"
Cause

You attempted to remove or replace a device with a mounted file system.

Solution

Unmount the file system that is listed in the error message and retry the cfgadm operation.

Error Message
cfgadm: Component system is busy, try again: failed to offline:
     device-path
          Resource              Information
     ------------------  --------------------------
     /dev/dsk/device-name   swap area
Cause

If you use the cfgadm command to remove a system resource, such as a swap device or a dedicated dump device, a similar error message is displayed if the system resource is still active.

Solution

Unconfigure the swap areas on the device that is specified and retry the cfgadm operation.

Error Message
cfgadm: Component system is busy, try again: failed to offline:
     device-path
          Resource              Information
     ------------------  --------------------------
     /dev/dsk/device-name   dump device (swap)
Cause

You attempted to remove or replace a dump device that is configured on a swap area.

Solution

Unconfigure the dump device that is configured on the swap area and retry the cfgadm operation.

Error Message
cfgadm: Component system is busy, try again: failed to offline:
     device-path
          Resource              Information
     ------------------  --------------------------
     /dev/dsk/device-name   dump device (dedicated)
Cause

You attempted to remove or replace a dedicated dump device.

Solution

Unconfigure the dedicate dump device and retry the cfgadm operation.

How to Resolve a Failed SCSI Unconfigure Operation

Use this procedure if one or more target devices are busy and the SCSI unconfigure operation fails. Otherwise, future dynamic reconfiguration operations on this controller and target devices will fail with a dr in progress message.

  1. Become superuser.
  2. Reconfigure the controller.
    # cfgadm -c configure device-name
Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire