scsi-spin8
Spin up and down a scsi device
Usage
scsi-spin [-options ...]
[device]
Overview
scsi-spin let the user to manually spin up and down a SCSI device.
This command is particularly useful if you've got noisy (or hot) drives in a machine that you rarely need to access. This is not the same as the kernel patch that's floating around that will automatically spin down the drive after some time. scsi-spin is completely manual, and spinning down a drive that's in use, especially the one containing the scsi-spin binary, is probably a really bad idea.
To avoid running in trouble with such cases, scsi-spin verifies that the device to work on is not currently in use by scanning the mounted file system description file for a partition living on it and issue an error if this the case.
Options
-
-u, --up -
spin up device.
-
-d, --down -
spin down device.
-
-e, --loej -
load or eject medium from drive (use along with
-uor-d)
-
-w, --wait=[n] -
wait up to
nseconds for the spin up/down command to complete. Default is to return immediately after the command was sent to the device. Either repeat-wn times or setnto define the time to wait before to report a timeout.
-
-l, --lock -
prevent removal of medium from device.
-
-L, --unlock -
allow removal of medium from device.
-
-I, --oldioctl -
use legacy ioctl interface instead of SG_IO to dialog with device (could not be supported on all platforms).
-eand-ware not allowed with this option.
-
-v, --verbose=[n] -
verbose mode. Either repeat
-vor setnaccordingly to increase verbosity. 1 is verbose, 2 is debug (dump SCSI commands and Sense buffer).
-
-f, --force -
force spinning up/down the device even if it is in use.
-
-n, --noact -
do nothing but check if the device is in use.
-
-p, --proc -
use /proc/mounts instead of /etc/mtab to determine if the device is in use or not.
device-
the device is any name in the filesystem which points to a SCSI block device (sd, scd) or generic SCSI device (sg). See section below.
SCSI devices naming convention
Old kernel naming convention
It is typically /dev/sd[a-z] , /dev/scd[0-9]* or /dev/sg[0-9]*.
scsidev naming convention
It is typically /dev/scsi/s[rdg]h[0-9]*-e????c?i?l? or /dev/scsi/<aliasname>.
devfs naming convention
It is typically /dev/scsi/host[0-9]/bus[0-9]/target[0-9]/lun[0-9]/disc (same for cd and generic devices) or short name /dev/sd/c[0-9]b[0-9]t[0-9]u[0-9] when devfsd "new compatibility entries" naming scheme is enabled.
Releases
13 releases since Debian 2.2 (Potato); the text changed 2 times.
--down since Debian 3.0 (Woody);
--force since Debian 3.0 (Woody);
--lock since Debian 4.0 (Etch);
--loej since Debian 4.0 (Etch);
--noact since Debian 3.0 (Woody);
--oldioctl since Debian 4.0 (Etch);
--proc since Debian 3.0 (Woody);
--unlock since Debian 4.0 (Etch);
--up since Debian 3.0 (Woody);
--verbose since Debian 4.0 (Etch);
--wait since Debian 4.0 (Etch);
-I since Debian 4.0 (Etch);
-L since Debian 4.0 (Etch);
-d since Debian 3.0 (Woody);
-e since Debian 4.0 (Etch);
-f since Debian 3.0 (Woody);
-l since Debian 4.0 (Etch);
-n since Debian 3.0 (Woody);
-p since Debian 3.0 (Woody);
-u since Debian 3.0 (Woody);
-v since Debian 4.0 (Etch);
-w since Debian 4.0 (Etch).