aboutsummaryrefslogtreecommitdiff
path: root/README.sg_start
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2007-06-27 02:41:23 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2007-06-27 02:41:23 +0000
commit8bd276c9b79265c508d29c43e029df034c7f7987 (patch)
treedbb644365f13abffa52e49ab57ea52fc45947b84 /README.sg_start
parent3afa50f47b9af629ea07c4876fc013d4080d0eab (diff)
downloadsg3_utils-8bd276c9b79265c508d29c43e029df034c7f7987.tar.gz
Load sg3_utils-0.94 into trunk/.
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@12 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'README.sg_start')
-rw-r--r--README.sg_start29
1 files changed, 29 insertions, 0 deletions
diff --git a/README.sg_start b/README.sg_start
new file mode 100644
index 00000000..76251cf5
--- /dev/null
+++ b/README.sg_start
@@ -0,0 +1,29 @@
+Hi,
+
+you can use sg_start to start (spin-up, 1) and stop (spin-down, 0) devices.
+I also offers a parameter (-s) to send a synchronize cache command to a
+device, so it should write back its internal buffers to the medium.
+
+Be aware that the Linux SCSI subsystem at this time does not autmatically
+starts stopped devices, so stopping a device which is in use may have fatal
+results for you.
+
+So, you should apply with care.
+I use it in my shutdown script at the end (before the poweroff command):
+
+# SG_SHUG_NOS is set in my config file rc.config
+# SG_SHUT_NOS="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"
+if test -x /bin/sg_start; then
+ if test "`basename $command`" = "reboot"; then
+ for no in $SG_SHUT_NOS;
+ do /bin/sg_start /dev/sg$no -s >/dev/null 2>&1;
+ done
+ else
+ for no in $SG_SHUT_NOS;
+ do /bin/sg_start /dev/sg$no -s 0 >/dev/null 2>&1;
+ done
+ fi
+fi
+
+Enjoy!
+ Kurt Garloff <garloff@suse.de>