|
Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!
SG_START(8) SG3_UTILS SG_START(8)
NAME
sg_start - starts (spins-up) or stops (spins down) device, load or
eject medium
SYNOPSIS
sg_start [--eject] [--fl=<n>] [-i] [--imm=0|1] [--load] [--loej]
[--pc=<n>] [--start] [--stop] [-v] [-V] [0|1] <device>
DESCRIPTION
sg_start sends a START STOP UNIT SCSI command to the given device with
the selected options. The most used options are '--stop' to spin down a
disk and '--start' to spin up a disk. Using 'sg_start --start /dev/sda'
on a disk that is already spinning is harmless. There is also finer
grain control with "power conditions": active, idle and standby. In
some contexts the "stop" state can be considered an additional power
condition.
Devices that contain removable media such as cd/dvds can use the
'--loej' flag to load the medium when used in conjunction with
'--start' (i.e. load medium then spin up). Alternatively '--loej' may
be used to eject the medium when used alone or when used in conjunction
with '--stop' (i.e. spin down then eject medium). More simply the load-
ing and ejecting of a removable medium can be requested with the
'--load' and '--eject' options.
If no option or argument is given then a '--start' is assumed; as the
utility's name suggests.
0 stop (spin-down) given device. Active when '--pc=" is not given
or '--pc=0'.
1 start (spin-up) given device. Active when '--pc=" is not given
or '--pc=0'. Harmless if device has already started (or is in
the process of starting).
--eject
stop the medium and eject it from the drive. Only appropriate
for a device with removable medium. Might be ignored (pre-
vented), see below.
--fl=<n>
sets the format layer number for the disc to "jump" to (defined
in MMC-5). Values of '<n>' can be 0 to 3. When this option is
chosen, the FL, LoEj and Start bits are set in the cdb as
required by MMC-5; thus the user does not need to set the
'--start' and/or '--load' options.
-i sets the IMM bit on the START STOP UNIT command so this utility
will return immediately and not wait for the media to spin down.
Same effect as '--imm=1'. The default action (without this
option or a '--imm=1' option) is to wait until the media spins
down before returning.
--imm=0|1
when the immediate bit is 1 then this utility returns immedi-
ately after the device has received the command. When this
option is 0 (the default) then the utility returns once the com-
mand has completed its action (i.e. it waits until the device is
started or stopped).
--load load the medium in the drive and start it. Only appropriate for
a removable medium.
--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). If a
start/start indication is not given (neither "--start" nor
"--stop") and this option is given then a stop and eject action
is assumed.
--pc=<n>
set the 'power conditions' value (in hex); 0 to f (inclusive)
are valid. Default value is 0. When '--pc=0' then '--eject',
'--load', '--loej', '--start' and '--stop' are active. Some com-
mon values are 1 for the active power condition (SBC); 2 for the
idle power condition; 3 for the standby power condition; 5 for
sleep power condition (MMC); 7 for LU_CONTROL (SBC), 0xa (deci-
mal 10) for FORCE_IDLE_0 (SBC) and 0xb (decimal 11) for
FORCE_STANDBY_0 (SBC). See recent SBC-3, MMC-5 and SAS drafts
at www.t10.org for more information.
--start
start (spin-up) given device. Using this option on an already
started device is harmless. Same meaning as "1" argument.
--stop stop (spin-down) given device. Same meaning as "0" argument.
-v verbose: outputs SCSI command in hex to console before with exe-
cuting it. '-vv' and '-vvv' are also accepted yielding greater
verbosity.
-V print out version string then exit.
All options, other than '-v' and '-V', can be given with a single "-".
For example: "sg_start -stop /dev/sda" and "sg_start --stop /dev/sda"
are equivalent. The single "-" form is for backward compatibility.
To avoid confusion, only one of "0", "1", "--load", "--eject",
"--start" and "--stop" can be given.
There is an associated "power condition" mode page (0x1a) in which
timer values can be set for transitioning to either idle or standby
state after a period of inactivity. The sdparm utility can be used to
view the power condition mode page and if required change it. If a
device is in either idle or standby power condition state then a
REQUEST SENSE command (see the sg_requests utility) should yield a
sense key of "no sense" and an additional sense code of "Low power con-
dition on" on recent SCSI devices.
Ejection of removable media (e.g. 'sg_start --eject /dev/hdd' where the
device is an ATAPI cd/dvd drive) may be prevented by a prior PREVENT
ALLOW MEDIUM REMOVAL SCSI command (see sg_prevent). In this case this
utility should fail with an error generated by the device: illegal
request / medium removal prevented. This can be overridden using
sg_prevent or 'sdparm --command=unlock /dev/hdd'.
In the 2.4 series of Linux kernels the given device must be a SCSI
generic (sg) device. In the 2.6 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.6 series kernels.
NOTES
Earlier versions had a '-s' option to perform a SYNCHRONIZE CACHE com-
mand before the START STOP UNIT command was issued. According to recent
SBC-2 drafts this is done implicitly if required. Hence the "-s" option
has been dropped.
EXIT STATUS
The exit status of sg_start is 0 when it is successful. Otherwise see
the sg3_utils(8) man page.
AUTHOR
Written by K. Garloff and D. Gilbert
REPORTING BUGS
Report bugs to <dgilbert at interlog dot com>.
COPYRIGHT
Copyright © 2002-2006 Kurt Garloff, Douglas Gilbert
This software is distributed under the GPL version 2. There is NO war-
ranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR-
POSE.
SEE ALSO
sg_prevent(sg3_utils), sg_requests(sg3_utils), sdparm(sdparm)
sg3_utils-1.21 June 2006 SG_START(8)
Man(1) output converted with
man2html and wrapped by fishsponge
This page was generated on Sat Sep 8 16:40:29 GMT 2007
|
Your favourite pages:
No pages logged yet. Trying to save cookie... Top 10 most popular pages:
svn man page (6164 hits) (FreeBSD 6.2)
sqlite3 man page (5598 hits) (openSUSE 10.2)
adv_cap_autoneg man page (5045 hits) (Solaris 10 11_06)
CPAN man page (4791 hits) (Suse Linux 10.1)
ssh man page (4439 hits) (Suse Linux 10.1)
ssh-socks5-proxy-connect man page (3525 hits) (Solaris 10 11_06)
signal man page (3395 hits) (Suse Linux 10.1)
netcat man page (3383 hits) (Suse Linux 10.1)
pprosetup man page (2890 hits) (Solaris 10 11_06)
startproc man page (2739 hits) (Suse Linux 10.1)
|