__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
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 automatically
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 at suse dot de>
Postscript
==========
sg_start has been reworked to allow a block device (e.g. /dev/sda) in
addition to the sg device name (e.g. /dev/sg0) in the lk 2.6 series.
sg_start now has more command line options, see its man page.
Douglas Gilbert <dgilbert at interlog dot com> 2004/5/8
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| examples | Folder | 0755 |
|
|
| AUTHORS | File | 114 B | 0644 |
|
| COVERAGE.gz | File | 2.56 KB | 0644 |
|
| CREDITS.gz | File | 2.73 KB | 0644 |
|
| README.freebsd.gz | File | 2.2 KB | 0644 |
|
| README.gz | File | 10.92 KB | 0644 |
|
| README.iscsi | File | 1.27 KB | 0644 |
|
| README.sg_start | File | 1.2 KB | 0644 |
|
| README.solaris.gz | File | 2.52 KB | 0644 |
|
| README.tru64 | File | 2.77 KB | 0644 |
|
| README.win32.gz | File | 4.15 KB | 0644 |
|
| changelog.Debian.gz | File | 1.17 KB | 0644 |
|
| copyright | File | 2.74 KB | 0644 |
|