This chapter describes the following new system administration information:
For the most up-to-date man pages, use the man command. The Solaris 7 11/99 man pages include new feature information not found in the Solaris 7 Reference Manual Collection.
This functionality was changed in the Solaris 7 5/99 software release.
Dynamic reconfiguration (DR) enables a server with a faulty system board to continue running while that board is logically detached, physically removed, physically replaced, then logically attached, eliminating downtime and the time lost in rebooting. Once a board has been detached the server can continue running even if a replacement board is not yet available. In servers that support domains, DR can be used to reassign a good board from one domain to another. On selected servers, CPU/memory boards can also be logically attached and detached.
The system administrator typically executes the DR commands, while the service provider does the actual board swapping. Only certain SPARC servers support this version of DR. See your hardware manufacturer's documentation for information about whether your server supports DR.
This functionality is updated in the Solaris 7 11/99 software release.
The devfsadm command provides an improved mechanism for managing the special device files in the /dev and /devices directories, including support for dynamic reconfiguration events.
In previous Solaris releases, device configuration was handled by drvconfig, which managed the physical device entries in the /devices directory, and five link generators, devlinks, disks, tapes, ports, and audlinks, which managed the logical device entries in the /dev directory.
These utilities were not aware of hot-pluggable devices nor were they flexible enough for devices with multiple instances. For compatibility purposes, drvconfig and the other link generators are symbolic links to the devfsadm utility. See System Administration Guide, Volume I for information about hot-pluggable devices.
Both reconfiguration boot processing and updating the /dev and /devices directories in response to dynamic reconfiguration events is handled by devfsadmd, the daemon version of the devfsadm command. This daemon is started from the /etc/rc* scripts when a system is booted.
Since devfsadmd automatically detects device configuration changes generated by any reconfiguration event, there is no need to run this command interactively.
See the man page devfsadm(1M) for more information.
The cfgadm command is updated in the Solaris 7 11/99 software release to provide PCI hot-plugging for supported PCI adapter cards on x86 systems. This information supplements information on managing devices found in "Managing Devices" in System Administration Guide, Volume I.
Hot-plugging PCI adapter cards provides the ability to add and remove a hot-pluggable PCI adapter card on a running system without rebooting the system.
As part of Sun's high availability strategy, this feature is expected to be used in conjunction with additional layered products, such as alternate pathing or fail-over software, which provide fault tolerance in the event of a device failure.
Without any high availability software, you can replace a failed device by manually stopping the appropriate applications, unconfiguring the device, and then proceeding with the add or remove operations.
Currently, PCI hot-plugging is supported on the Intel platform. Please refer to x86 Hardware Compatibility List for a list of PCI hardware that supports hot-plugging.
The following section describes different hot-plugging operations and then provides step-by-step instructions for hot-plugging PCI adapter cards.
A PCI adapter card hosting non-vital system resources can be removed if the device driver supports hot-plugging.
A PCI adapter card is not detachable if it is a vital system resource. For a PCI adapter card to be detachable:
The device driver must support hot-plugging.
Critical resources must be accessible through an alternate pathway.
For example, if a system has only one ethernet card installed in it, the ethernet card cannot be detached without losing network connection. This replacement requires additional layered software support to keep the network connection active.
See "x86: How to Remove a PCI Adapter Card" for step-by-step instructions on removing a PCI adapter card.
A PCI adapter card can be added to the system as long as:
There are slots available.
The device driver supports hot-plugging for this adapter card.
See "Attaching PCI Adapter Cards" for step-by-step instructions on adding a PCI adapter card.
In the following examples, only PCI attachment points are listed, for brevity. The attachment points displayed on your system will depend on your system configuration.
The cfgadm (1M) command displays the status of PCI hot-pluggable devices and slots on a system.
Become superuser.
Display PCI slot configuration information.
# cfgadm pci Ap_Id Receptacle Occupant Condition pci1:hpc0_slot0 empty unconfigured unknown pci1:hpc0_slot1 empty unconfigured ok pci1:hpc0_slot2 empty unconfigured ok pci1:hpc0_slot3 connected configured ok pci1:hpc0_slot4 empty unconfigured ok # cfgadm -s "cols=ap_id:type:info" pci Ap_Id Type Information pci1:hpc0_slot0 unknown Slot 7 pci1:hpc0_slot1 unknown Slot 8 pci1:hpc0_slot2 unknown Slot 9 pci1:hpc0_slot3 Ethernet/HP Slot 10 pci1:hpc0_slot4 unknown Slot 11 |
The logical ap_id, pci1:hpc0_slot0, is the logical ap_id for that particular hot-pluggable slot, Slot 7, (physical identification of this slot). The component hpc0 indicates the hot-pluggable adapter card for this slot and pci1 indicates the PCI bus instance. The Type field indicates the type of PCI adapter card present in the slot.
Become superuser.
Determine which slot the controller is in.
# cfgadm Ap_Id Receptacle Occupant Condition pci1:hpc0_slot0 empty unconfigured unknown pci1:hpc0_slot1 empty unconfigured unknown pci1:hpc0_slot2 empty unconfigured unknown pci1:hpc0_slot3 connected configured ok pci1:hpc0_slot4 empty unconfigured unknown |
Stop the application that has the device open.
For example, if this is an ethernet card, use ifconfig(1M) to bring down the interface and unplumb the interface.
Unconfigure the device.
# cfgadm -c unconfigure pci1:hpc0_slot3 |
Confirm the device has been unconfigured.
# cfgadm Ap_Id Receptacle Occupant Condition pci1:hpc0_slot0 empty unconfigured unknown pci1:hpc0_slot1 empty unconfigured unknown pci1:hpc0_slot2 empty unconfigured unknown pci1:hpc0_slot3 connected unconfigured unknown pci1:hpc0_slot4 empty unconfigured unknown |
Disconnect the power to the slot.
# cfgadm -c disconnect pci1:hpc0_slot3 |
Confirm the device has been disconnected.
# cfgadm Ap_Id Receptacle Occupant Condition pci1:hpc0_slot0 empty unconfigured unknown pci1:hpc0_slot1 empty unconfigured unknown pci1:hpc0_slot2 empty unconfigured unknown pci1:hpc0_slot3 disconnected unconfigured unknown pci1:hpc0_slot4 empty unconfigured unknown |
Open the slot latches and remove the board.
Become superuser.
Identify the hot-pluggable slot and open latches.
Insert the adapter card into a hot-pluggable slot.
Determine which slot the adapter card is in once it is inserted and the latches are closed.
# cfgadm Ap_Id Receptacle Occupant Condition pci1:hpc0_slot0 empty unconfigured unknown pci1:hpc0_slot1 empty unconfigured unknown pci1:hpc0_slot2 empty unconfigured unknown pci1:hpc0_slot3 disconnected unconfigured unknown pci1:hpc0_slot4 empty unconfigured unknown |
Connect the power to the slot.
# cfgadm -c connect pci1:hpc0_slot3 |
Confirm the slot is connected.
# cfgadm Ap_Id Receptacle Occupant Condition pci1:hpc0_slot0 empty unconfigured unknown pci1:hpc0_slot1 empty unconfigured unknown pci1:hpc0_slot2 empty unconfigured unknown pci1:hpc0_slot3 connected unconfigured unknown pci1:hpc0_slot4 empty unconfigured unknown |
Configure the PCI hot-pluggable adapter card.
# cfgadm -c configure pci1:hpc0_slot3 Ap_Id Receptacle Occupant Condition pci1:hpc0_slot3 connected configured ok |
Verify the configuration of the adapter card in the slot.
# cfgadm pci1:hpc0_slot3 |
Configure any supporting software if this is a new device.
For example, if this is an ethernet card, use the ifconfig(1M) command to set up the interface.
cfgadm: Configuration operation invalid: invalid transition |
An invalid transition was attempted.
Check whether the cfgadm -c command was issued appropriately. Use cfgadm to check the current receptacle and occupant state and make sure the ap_id is correct.
cfgadm: Attachment point not found |
Specified attachment point was not found.
Check whether the attachment point is correct. Use the cfgadm to display a list of available attachment points. Also check the physical path to see if the attachment point is still there.
In addition to cfgadm command, several other commands are helpful during hot-plug operations. The prtconf(1M) command confirms whether or not Solaris recognizes the hardware. After a successful configuration of a hot-pluggable adapter card, use the prtconf command to verify that the specific PCI bus instance for the new hardware displays in the prtconf output. The prtconf output also indicates if the driver for the new hardware is attached.
The cfgadm command is updated in the Solaris 7 8/99 software release to provide SCSI hot-plugging for supported SCSI controllers. This information supplements information on managing devices found in "Managing Devices" in System Administration Guide, Volume I.
Hot-plugging is the ability to physically add, remove, or replace system components while the system is running. Dynamic reconfiguration refers to the ability to hot-plug system components and also the general ability to move system resources--both hardware and software--around in the system, or to disable them without removing them from the system.
Features of the cfgadm command include:
Displaying system component status
Testing system components
Changing component configurations
Displaying configuration help messages
The benefit of using the cfgadm command to reconfigure SCSI components is that you can add, remove, or replace components while the system is running. An added benefit is that the cfgadm command guides you through the steps needed to add, remove, or replace SCSI components. See the man page cfgadm(1M) and "SCSI Hot-Plugging With the cfgadm Command" for step-by-step instructions on hot-plugging SCSI components.
Not all SCSI controllers support hot-plugging with the cfgadm command.
The cfgadm command displays information about attachment points, which are locations in the system where dynamic reconfiguration operations can occur.
An attachment point consists of:
An occupant, which represents a hardware resource that may be configured into the system, and
A receptacle, which is the location that accepts the occupant resource
Attachment points are named by logical and physical attachment point IDs (ap_id). The physical ap_id is the physical pathname of the attachment point. The logical ap_id is a user-friendly name that represents the physical attachment point pathname. Refer to cfgadm(1M) for more information on ap_id.
The logical ap_id for a SCSI host bus adapter (HBA), or SCSI controller, is usually represented by the controller number, such as c0.
In cases where no controller number has been assigned to a SCSI HBA, then an internally-generated unique identifier is provided. An example of a unique identifier for a SCSI controller is:
fas1:scsi
The logical ap_id for a SCSI device usually looks like this:
HBA-logical-apid::device-identifier
In the example below, c0 is the logical ap_id for the SCSI HBA:
c0::dsk/c0t3d0
The device identifier is typically derived from the logical device name for the device in the /dev directory. For example, a tape device with logical device name, /dev/rmt/1, has the following logical ap_id:
c0::rmt/1
If a logical ap_id of a SCSI device cannot be derived from the logical name in the /dev directory, then an internally-generated unique identifier is provided. An example of an identifier for the tape device /dev/rmt/1 is:
c0::st4
Refer to the man page cfgadm_scsi(1M) for more information on SCSI ap_ids.
The cfgadm command represents all resources and dynamic reconfiguration operations in terms of a common set of states (such as configured, unconfigured) and set of operations (connect, configure, unconfigure). Refer to the man page cfgadm(1M) for more information on these generic states and operations.
The receptacle and occupant states for the SCSI HBA attachment points are:
Receptacle |
Description |
Occupant |
Description |
---|---|---|---|
empty |
N/A to SCSI HBA |
configured |
One or more devices configured on the bus |
disconnected |
Bus quiesced |
unconfigured |
No devices configured |
connected |
Bus active |
|
|
Receptacle and occupant state mappings for SCSI devices are:
Receptacle |
Description |
Occupant |
Description |
---|---|---|---|
empty |
N/A to SCSI devices |
configured |
Device is configured |
disconnected |
Bus quiesced |
unconfigured |
Device is not configured |
connected |
Bus active |
|
|
The condition of SCSI attachment points is "unknown" unless there is special hardware to indicate otherwise. See "How to Display Configuration Information for All Devices" for instructions on displaying SCSI component configuration information.
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 you supply, and that is displayed with the cfgadm command, will depend on your system configuration.
SCSI controllers c0 and c1 and the devices attached to them are 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 will not display in the cfgadm command output.
Become superuser.
Display information about attachment points on the system.
# cfgadm -l Ap_Id Receptacle Occupant Condition ac0:bank0 connected configured ok ac0:bank1 connected configured ok c0 connected configured unknown c1 connected configured unknown sysctrl0:slot0 connected configured ok sysctrl0:slot1 connected configured ok |
In this example, c0 and c1 represent two SCSI controllers.
The other ap_ids such as ac0:bank1 and sysctrl0:slot0 in the command output represent other types of system components.
Display information about a system's SCSI controllers and their attached devices.
# cfgadm -al Ap_Id Receptacle Occupant Condition ac0:bank0 connected configured ok ac0:bank1 connected configured ok c0 connected configured unknown c0::dsk/c0t0d0 connected configured unknown c0::rmt/0 connected configured unknown c1 connected configured unknown c1::dsk/c1t10d0 connected configured unknown c1::dsk/c1t4d0 connected configured unknown c2 connected unconfigured unknown sysctrl0:slot0 connected configured ok sysctrl0:slot1 connected configured ok |
Notice that SCSI HBAs are displayed in the cfgadm -l output but not SCSI devices. The cfgadm -al command displays information about SCSI devices such as disks and tapes.
SCSI controller c1 provides an example of unconfiguring a SCSI controller.
Only SCSI attachment points are listed. The attachment points displayed on your system will depend on your system configuration.
Become superuser.
Unconfigure a SCSI controller.
# cfgadm -c unconfigure c1 |
Verify the SCSI controller is unconfigured.
# cfgadm -al Ap_Id Receptacle Occupant Condition c0 connected configured unknown c0::dsk/c0t0d0 connected configured unknown c0::rmt/0 connected configured unknown c1 connected unconfigured unknown |
Notice that the Occupant column specifies unconfigured for c1, indicating that the SCSI bus has no configured occupants.
SCSI controller c1 provides an example of configuring a SCSI controller.
Only SCSI attachment points are listed. The attachment points displayed on your system will depend on your system configuration.
Become superuser.
Configure a SCSI controller.
# cfgadm -c configure c1 |
Verify the SCSI controller is configured.
# cfgadm -al Ap_Id Receptacle Occupant Condition c0 connected configured unknown c0::dsk/c0t0d0 connected configured unknown c0::rmt/0 connected configured unknown c1 connected configured unknown c1::dsk/c1t10d0 connected configured unknown c1::dsk/c1t4d0 connected configured 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.
Only SCSI attachment points are listed. The attachment points displayed on your system will depend on your system configuration.
Become superuser.
Identify the device to be configured.
cfgadm -al Ap_Id Receptacle Occupant Condition c0 connected configured unknown c0::dsk/c0t0d0 connected configured unknown c0::rmt/0 connected configured unknown c1 connected configured unknown c1::dsk/c1t10d0 connected configured unknown c1::dsk/c1t4d0 connected unconfigured unknown |
Configure a specific SCSI device.
# cfgadm -c configure c1::dsk/c1t4d0 |
Verify the SCSI device is configured.
# cfgadm -al Ap_Id Receptacle Occupant Condition c0 connected configured unknown c0::dsk/c0t0d0 connected configured unknown c0::rmt/0 connected configured unknown c1 connected configured unknown c1::dsk/c1t10d0 connected configured unknown c1::dsk/c1t4d0 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 Receptacle Occupant Condition c0 connected configured unknown c0::dsk/c0t0d0 connected configured unknown c0::rmt/0 connected configured unknown c1 connected configured unknown c1::dsk/c1t10d0 connected configured unknown c1::dsk/c1t4d0 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 Receptacle Occupant Condition c0 connected configured unknown c0::dsk/c0t0d0 connected configured unknown c0::rmt/0 connected configured unknown c1 disconnected configured unknown c1::dsk/c1t10d0 disconnected configured unknown c1::dsk/c1t4d0 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.
Only SCSI attachment points are listed. The attachment points displayed on your system will depend on your system configuration.
Become superuser.
Verify the device is disconnected before connecting it.
# cfgadm -al Ap_Id Receptacle Occupant Condition c0 connected configured unknown c0::dsk/c0t0d0 connected configured unknown c0::rmt/0 connected configured unknown c1 disconnected configured unknown c1::dsk/c1t10d0 disconnected configured unknown c1::dsk/c1t4d0 disconnected configured unknown |
Connect a SCSI controller.
# cfgadm -c connect c1 |
Verify the SCSI controller is connected.
# cfgadm -al Ap_Id Receptacle Occupant Condition c0 connected configured unknown c0::dsk/c0t0d0 connected configured unknown c0::rmt/0 connected configured unknown c1 connected configured unknown c1::dsk/c1t10d0 connected configured unknown c1::dsk/c1t4d0 connected configured unknown |
SCSI controller c1 provides an example of adding a SCSI device to a SCSI bus.
Only SCSI attachment points are listed. The attachment points displayed on your system will depend on your system configuration.
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 Receptacle Occupant Condition c0 connected configured unknown c0::dsk/c0t0d0 connected configured unknown c0::rmt/0 connected configured unknown c1 connected configured unknown c1::dsk/c1t10d0 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 Receptacle Occupant Condition c0 connected configured unknown c0::dsk/c0t0d0 connected configured unknown c0::rmt/0 connected configured unknown c1 connected configured unknown c1::dsk/c1t10d0 connected configured unknown c1::dsk/c1t4d0 connected configured unknown |
A new disk has been added to controller c1.
SCSI disk c1t4d0 provides an example replacing an identical device on a SCSI controller.
Only SCSI attachment points are listed. The attachment points displayed on your system will depend on your system configuration.
Become superuser.
Identify the current SCSI configuration.
# cfgadm -al Ap_Id Receptacle Occupant Condition c0 connected configured unknown c0::dsk/c0t0d0 connected configured unknown c0::rmt/0 connected configured unknown c1 connected configured unknown c1::dsk/c1t10d0 connected configured unknown c1::dsk/c1t4d0 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 Receptacle Occupant Condition c0 connected configured unknown c0::dsk/c0t0d0 connected configured unknown c0::rmt/0 connected configured unknown c1 connected configured unknown c1::dsk/c1t10d0 connected configured unknown c1::dsk/c1t4d0 connected configured unknown |
SCSI disk c1t4d0 provides an example of removing a device on a SCSI controller.
Only SCSI attachment points are listed. The attachment points displayed on your system will depend on your system configuration.
Become superuser.
Identify the current SCSI configuration.
# cfgadm -al Ap_Id Receptacle Occupant Condition c0 connected configured unknown c0::dsk/c0t0d0 connected configured unknown c0::rmt/0 connected configured unknown c1 connected configured unknown c1::dsk/c1t10d0 connected configured unknown c1::dsk/c1t4d0 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 Receptacle Occupant Condition c0 connected configured unknown c0::dsk/c0t0d0 connected configured unknown c0::rmt/0 connected configured unknown c1 connected configured unknown c1::dsk/c1t10d0 connected configured unknown |