sdirm(ADM)


sdirm -- remove existing mass-storage devices from the system configuration

Synopsis

/sbin/sdirm [-n] device_number

Description

The sdirm script removes support for an existing mass-storage device from the system configuration, allowing the device to be removed from the SCSI bus and taken out of service. This is the converse function to sdiadd -n which allows the hot addition of supported mass-storage devices.

Options

sdirm takes the following option:

-n
Allow the user to override the system's temporarily halting when sdirm quiets the SCSI bus. This option also removes the requirement that sdirm be run from the console.

Arguments

The device_number must be in one of the following forms:

In the device_number, the W, X, Y, and Z specify the controller, bus, target, and LUN.

If the bus is not specified, then it is assumed to be zero. If the LUN is not specified, then all LUNs associated with the device are removed. If the device has multiple LUNs, then sdirm must be run on each of the device nodes or the second form can be used and the LUN left unspecified.

Usage

Hot addition/removal is the ability to add and remove SCSI devices from a running system. This feature works with all packages that access the HBA driver, including, but not limited to, mounted file systems, the Veritas Volume Manager, and raw device access through /dev/rdsk and /dev/rmt.

To use this feature, the HBA and target drivers must support hot addition/removal.

To remove a device from the system, the system administrator:

  1. Ensures that removing the device will not alter the SCSI bus termination. The device cannot be removed if the SCSI bus termination will be altered.

  2. Executes /sbin/sdirm with the -n option and the device node as arguments. If the command fails because either the target or HBA driver does not support hot addition/removal, then the device cannot be removed. If the command fails because the device is open, then the system administrator must correct this before the command can be re-executed. sdirm quiets the SCSI bus and notifies the user when it is safe to remove the device from the system.

  3. Remove the device from the SCSI bus.

  4. Press the <Enter> key to inform sdirm that the device has been removed and normal SCSI bus operation can resume.

Return values

Because sdirm calls other system commands to perform the system reconfiguration, it reports all errors encountered by those commands, then cleans up intermediate files created in the process.

References

diskadd(ADM), sdiadd(ADM)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 02 June 2005