blob: 149286d9fb87ad1465307d9cfa13203440e9e87c [file] [log] [blame]
.TH SG_START "8" "May 2003" "sg3_utils-1.04" SG3_UTILS
.SH NAME
sg_start \- starts (spins-up) or stops (spins down) SCSI devices
.SH SYNOPSIS
.B sg_start
[\fI-d\fR] [\fI-imm=0|1\fR] [\fI-loej\fR] [\fI-pc=<n>\fR]
[\fI-s\fR] [\fI-V\fR] [\fI0|1\fR] \fI<sg_device>\fR
.SH DESCRIPTION
.\" Add any additional description here
.PP
sg_start sends a START STOP UNIT SCSI command to the given device with
the selected options. The most used options are "0" to spin down a disk
and "1" to spin up a disk. Using "sg_start 1 /dev/sg0" on a disk that
is already spinning is harmless.
.TP
-d
outputs some extra debug information associated with executing this command
.TP
-imm=0|1
when the immediate bit is 1 (default) then this command (and hence this
utility) return immediately after the device has received the command.
When this switch is 0 then the command returns when the action it
requests has been completed.
.TP
-loej
load the media when the unit is started or eject it when the unit is
stopped. This option is ignored if 'pc > 0'. Default is off (i.e. don't
attempt to load or eject media). Obviously only makes sense with
removable media.
.TP
-pc=<n>
set the 'power conditions' value (in hex); 0 to f (inclusive) are valid.
When '-pc=0' then the start value (i.e. 0 or 1) and '-loej' are active.
See recent SBC-2 or SAS drafts at www.t10.org for meaning.
.TP
-s
send the SYNCHRONIZE CACHE SCSI command to the device prior to sending the
START STOP UNIT command.
.TP
-V
print out version string then exit.
.TP
0
stop (spin-down) given device. Active when '-pc=0' or is not given.
.TP
1
start (spin-up) given device. Active when '-pc=0' or is not given.
.PP
In the 2.4 series of Linux kernels the given device must be
a SCSI generic (sg) device. In the 2.5 series block devices (e.g. disks
and SCSI DVDs) can also be specified. For example "sg_start 0 /dev/sda"
will work in the 2.5 series kernels.
.SH AUTHOR
Written by K. Garloff and D. Gilbert
.SH "REPORTING BUGS"
Report bugs to <dgilbert@interlog.com>.
.SH COPYRIGHT
Copyright \(co 2002-2003 Kurt Garloff, Douglas Gilbert
.br
This software is distributed under the GPL version 2. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.SH "SEE ALSO"
.B sg_senddiag(sg3_utils)