There were ZERO replies to this post, but don't feel bad because I also posted this information to the gvfs mailing list (http://mail.gnome.org/mailman/listinfo/gvfs-list) and got ZERO responses there as well.
In the mean time, I kept looking for whatever way possible to keep the hard drive spun down. If I couldn't keep the daemon (or whatever was the cause) from spinning the drive back up, maybe there was a way of "incapacitating" the drive itself. I came across a pretty good web site:
http://linuxmafia.com/pub/linux/suse-linux-internals/chapter2.html
SuSE Linux Internals, Terrehon Bowden, Bodo Bauer
This at least gave me the correct terminology to use in a Google search where I found ...
http://www.faqs.org/docs/Linux-HOWTO/SCSI-Generic-HOWTO.html
dgilbert at interlog dot com
The Linux SCSI Generic (sg) HOWTO
SCSI version - Mint 8: 30534 3.5.34 [20061027]
This got me very close, as it discusses some of the internal operations of the SCSI driver on the hardware. It in turn led me to a search which found the Red Hat documentation site at:
http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/html/Online_Storage_Reconfiguration_Guide/task_controlling-scsi-command-timer-onlining-devices.html
This was the best reference of all, and it almost nailed the solution to the problem. It discussed the "/proc" directory and showed:
- Code: Select all
mint mint # cat /proc/scsi/sg/devices
host chan id lun type opens qdepth busy online
0 0 0 0 0 1 1 0 1
Ah! If there is a flag for the device 'ONline, there must be some way to set if "OFFline", and if I could do that, what would happen? After a couple of more hours searching, reading, and testing, I finally came up with a most excellent solution:
- Code: Select all
# The command to set the hard drive device offline can ONLY be run in root. "sudo echo" will NOT work!
mint@mint ~ $ sudo -i
# Spin the hard drive down ... I figured this out a month ago ... must be done while ONline
mint ~ # hdparm -y /dev/sda
/dev/sda
issuing standby command
# Set the hard drive OFFline
mint ~ # echo offline > /sys/block/sda/device/state
# Make sure the device received the command [optional]
mint ~ # cat /sys/block/sda/device/state
offline
OK! Major success. I presume the daemon still tries to 'tick' the drive, but the system ran just fine for several hours with the drive continuously spun down and offline.
Now, if I could set the drive OFFline, could I get it back spinning again? Again the answer is absolutely YES, but there is a trick to it. You can NOT set the drive ONline! I noticed that the state before I set it offline was "running", so, I ran the 'echo' command to pass "running" to SDA, and it worked perfectly. Once the drive is online (i.e. 'running'), I can spin it up and mount it by accessing the drive in the 'Places' list in the Gnome Nautilus File Browser.
- Code: Select all
# Set the hard drive ONline
mint ~ # echo running > /sys/block/sda/device/state
So, now I have a totally secure web browsing system ... my system is securly locked on an SD flash memory card, and while I am connected to the internet, my hard drive is totally inaccessible, however, I can still spin up and remount the drive whenever I want. I still have a few more things I want to do, but the important tasks are finally accomplished.
Blessings in abundance, all the best, and ENJOY!
Art in Carlisle PA USA





