xscsiadminswap - perform a live plug or unplug of a scsi
device accessed using the linux-xscsi subsystem.
SYNOPSIS
xscsiadminswap [ options ]
DESCRIPTION
xscsiadminswap allows a user to live plug or unplug a scsi
device assuming it is not a primary resource (such as the
system disk). There are three required options. These
indicate whether to perform a plug or an unplug and pro
vide a bus and device number. An additional argument can
be used to change the default timeout value. To execute
xscsiadminswap, a user must have root status.
There are many different ways that a disk may be accessed.
While this man page outlines and gives examples of the
more common ones, if there is any question the user should
check the man pages for umount, mount, fuser etc.
Unplugging a disk:
Before executing the xscsiadminswap unplug, all the file
systems of the disk in question must be unmounted (see
umount(8)). To do so it may be necessary to use fuser(1)
to kill any processes using the file systems.After the
above steps run
xscsiadminswap -u -b <bus> -d <device>
Plugging in a disk:
First run
xscsiadminswap -p -b <bus> -d <device>
Now the file system may need to be mounted (see mount(8)).
The above cases for plug and unplug only cover common sit
uations.
Also see the Examples section at the end of the man page
for a sample session.
The required options are:
-u or -p Indicates whether operation is an (u)nplug or
a (p)lug. If both are specified, it will be
report as an error.
-b bus Specifies the scsi bus for the device.
-d device Specifies the drive to be removed or
Additional options:
-t secs Specifies the number of seconds the command
will wait while the drive is inserted or
removed. This default value is 300 (5 min
utes). This is the amount of time the com
mand will wait before automatically continu
ing with the sequence. In general the com
mand continues when the user hits enter after
having inserted or removed the drive.
-f Force the command to occur even if it discov
ers there are still mounted file systems, or
file systems in use. This is very dangerous.
Examples
The following sequence of commands could be used to swap a
disk mounted as /x
umount /x
xscsiadminswap -u -b /dev/xscsi/pci01.08.0/bus -d /dev/xscsi/pci01.08.0/target51/lun0/ds
xscsiadminswap -p -b /dev/xscsi/pci01.08.0/bus
mount -t xfs /dev/xscsi/pci01.08.0/target51/lun0/disc /x
FILES
/dev/xscsi/pci*/target*/lun*/ds - the SGI linux-xscsi
driver device /dev/xscsi/pci*/bus - the SGI linux-xscsi
bus device
SEE ALSO
fuser(1), mount(8), umount(8), fstab(5), xscsiha(8).
WARNINGS
Care should be take when using the xscsiadminswap command.
There are periods when the scsi bus is in a sensitive
state. The command should always be allowed to continue
to completion. Keep the amount of time it takes to remove
or insert the drive to a minimum. The most sensitive time
occurs during the unplug operation while the command is
waiting for the drive to be removed. During this period
no other data can be written to any device on the bus from
which the drive is being removed. If the drive can not be
removed or inserted in the requested time do NOT kill the
command half way through, let it finish and re-try again
later. Killing the command during execution will leave
the scsi bus in a bad state. Also to help ensure command
success and prevent the system from failing, any file sys
tems on the disk to be removed should not currently be in
Man(1) output converted with
man2html