[mythtv-users] Disk Power Control

Simon Hobson linux at thehobsons.co.uk
Mon Feb 2 19:59:22 UTC 2009


Ian Bonham wrote:

>I have been looking at scripts that can use /proc/diskstats to 
>detect if a drive has been idle, and then send a spin-down signal to 
>the disk. I was thinking of modifying this system so rather than 
>just spinning down a disk, I can unmount it, and then turn off power 
>to the socket on the multigang it is connected to.
>
>However, where as a spin-down is a 'soft power down' and the disk 
>spins back up when it gets a new request across the bus, in this 
>case I would be physically turning off the power brick for the disk.
>
>Obviously what I need to do is detect either a request to the 
>device, or an attempted read of the related mount point, which would 
>then trigger power back to the relevant multigang socket.

As a very quick thought, have you looked at how the various "virtual 
CD jukebox" setups do it ? IIRC they use a system of links and 
automounts to have an image automounted on a loopback device - and 
after a period of inactivity, it will automatically unmount it. Don't 
know if there are any points in the process where you could insert a 
script to control an external power switch.


Allan Stirling wrote:

>As far as I know, all those units do is look for USB power. There is 
>no communication protocol. They won't even work (will never switch 
>off) with PCs that retain USB power during standby.

There are some units out there, though I doubt in the $20 range, that 
do have remote control over individual power sockets. Hmm, a quick 
look gets me to this page for APC stuff 
http://www.apc.com/products/family/index.cfm?id=70, they start at 
over $500 !


-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.


More information about the mythtv-users mailing list