Ok, quick manual test with Mac OSX gives me this pop-up dialog box when powering off a mounted disk:
The good news is that I can simply leave this message on the screen, since subsequent power cycling won’t create more dialog boxes. The disk mounts as usual, presumably after a sanity check. I’m using a journalled file system, so these checks should be quick and risk-free.
I can live with that on a “headless” server. Key issue will be to only power off when there really is nothing happening on the disk drive.
why don’t you unmounts the drive? use the umount command. it does sync too – try the sync command. (flushes write cache)
My favorite place to spin down drives is within the OS, Is this not possible with OSx ? Saves you a lot of trouble. Are the drives mounted as removable drives ?
Folks, thanks for the suggestion, but I’m after a solution which deals with more devices than just hard disks, and which won’t cause the hard disks to spin up again when the OS starts a new access. A way to control devices attached to a computer, but not by that same computer.
Automatic spin-down is the obvious way to keep disks in sleep mode when not in use. Highly recommended … been doing that for years now.
Hi! I like that you’re going your own way, and I’m sure this is the right method of creating new ways of thinking. Maybe not all ideas will work out as they where intended, but the way there is always fun. And you never know if an idea will be “the next thing”.
That said, I find it funny to read all those “it won’t work”-comments;)
Keep it up!
Easy route for saving disk power would be to use SSD.
The OS is the Operating System, so my natural choice would be to use that to control devices, as soon as other stuff starts messing around with devices then your OS is no longer in control and things tend to break. If you want to have it off for security reasons then networked devices sound more logical to me.
Anyways, going the unusual route is the best route for inventing new stuff ;-)
This would be so easy (and safer) to script on a *NIX computer (including OS X).. just unmount the drive whenever some condition occur (the drive would shut down, but you could also cut power like you already do after it’s unmunted). That way you can safely handle still open files, and easily do checks like “when was the drive last accessed?”, “are there any open files?”, etc..
Nothing stopping you from triggering an unmount remotely either.. And no, unmounted drives does not spin up again when the computer tries to access. You have to mount it again.
I agree with you.
@jklu – Now that’d I’ve stopped hoarding bits (especially recorded TV shows), I have a couple of TB (yes..) of disks to spare, i.e. free, whereas SSD’s would be a hefty investment.
The suggestion to use the OS for spindowns and unmounts is of course a good one. My current thinking is to make the power threshold and duration configurable per device, so this could easily be combined by choosing a threshold below the idle state.
But as I’ve said before, this isn’t only about disks: there’s still the NAS, label printer, scanner, USB hub, ethernet switch, and more which I’d like to be able to disconnect… in some cases a single power supply, and in some cases a 12V -> 5V step down to control 5V devices from the same supply.