File: scsi-spin.8

package info (click to toggle)
scsitools 0.12-4
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,192 kB
  • sloc: ansic: 6,043; tcl: 2,144; sh: 923; makefile: 97
file content (121 lines) | stat: -rw-r--r-- 2,844 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
.TH scsi-spin 8 "03 September 2001"
.SH NAME
scsi-spin \- spin up and down a SCSI device
.SH SYNOPSIS
.BI "scsi-spin [-" "options..." "] [" device ]
.SH DESCRIPTION
.B 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
.B not
the same as the kernel patch that's floating around that will
automatically spin down the drive after some time.
.B 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
.B really
bad idea.

To avoid running in trouble with such cases,
.B 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.

.SH OPTIONS
.TP
.B -u, --up
spin up device.
.TP
.B -d, --down
spin down device.
.TP
.B -e, --loej
load or eject medium from drive (use along with
.B -u
or
.B -d
)
.TP
.B -w, --wait=[n]
wait up to
.B n
seconds for the spin up/down command to complete. Default is to return
immediately after the command was sent to the device.
Either repeat
.B -w
n times or set
.B n
to define the time to wait before to report a timeout.
.TP
.B -l, --lock
prevent removal of medium from device.
.TP
.B -L, --unlock
allow removal of medium from device.
.TP
.B -I, --oldioctl
use legacy ioctl interface instead of SG_IO to dialog with device
(could not be supported on all platforms).
.B -e
and
.B -w
are not allowed with this option.
.TP
.B -v, --verbose=[n]
verbose mode. Either repeat
.B -v
or set
.B n
accordingly to increase verbosity. 1 is verbose, 2 is debug (dump SCSI
commands and Sense buffer).
.TP
.B -f, --force
force spinning up/down the device even if it is in use.
.TP
.B -n, --noact
do nothing but check if the device is in use.
.TP
.TP
.B -p, --proc
use /proc/mounts instead of /etc/mtab to determine if the device is in use or
not.
.TP
.B 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.

.SH SCSI devices naming convention
.SS Old kernel naming convention
It is typically
.I /dev/sd[a-z]
,
.I /dev/scd[0-9]*
or
.I /dev/sg[0-9]*.

.SS scsidev naming convention
It is typically
.I /dev/scsi/s[rdg]h[0-9]*-e????c?i?l?
or
.I /dev/scsi/<aliasname>.

.SS 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
.B devfsd
"new compatibility entries" naming scheme is enabled.

.SH SEE ALSO
.BR scsiinfo (8),
.BR sg_start (8),
.BR sd (4),
.BR proc (5),

.SH AUTHORS
Eric Delaunay <delaunay@debian.org>, 2001
.br
Rob Browning <rlb@cs.utexas.edu>, 1998