Remote wake up hard drive from Windows

Status
Not open for further replies.

wintermute000

Explorer
Joined
Aug 8, 2014
Messages
83
Anyone have any tips/ideas as to how best to do following
- My freenas is setup to disk idle after 30 minutes (no off-track discussion on the pros/cons of this please, I know the score)
- This leads to a long, 30 second wait for my HTPC on playing the first file after cold boot. My HTPC uses SMB to access the share (via Kodi/XBMC's native SMB)
- Whats the best way to get my HTPC to wake the share as soon as possible? Also it appears that Freenas will wake the disks sequentially, judging from noise - any way to spin them all up at once?

I was thinking something like a crude windows batch file to mount the share, create a file then delete it? (I've noticed that sometimes browsing the share doesn't wake the drives). I'm wondering if there's any other good way as I don't actually map the drive in windows, its accessed via SMB:\\ inside XBMC/Kodi, so if I can avoid mapping the drive and leading to possible mischief on the desktop, that would be great.

A possible alternative I was thinking was a python script via Expect or similar CLI mechanism - but what's the best way to wake the hard drive in Freenas CLI? ataidle -i?
 

wintermute000

Explorer
Joined
Aug 8, 2014
Messages
83
FWIW I wrote a shell script and it more or less works from windows calling putty from CLI.

My main gripe now is that this method is sequential. Can I (is it even safe?) to call this simultaneously on each drive in my array? i.e. wake all 6 drives (in my case) at once

#!/bin/sh
# repeat for each HDD you have
ADA0STATUS=$(/sbin/camcontrol cmd ada0 -a "E5 00 00 00 00 00 00 00 00 00 00 00" -r - | tail -c 6 | head -c 2)

HDDUP="FF"
HDDDOWN="00"

if [ $ADA0STATUS = $HDDUP ]; then
echo "ada0 is spinning " $ADA0STATUS
elif [ $ADA0STATUS = $HDDDOWN ]; then
echo "ada0 is spun down, spinning up"
/usr/local/sbin/ataidle -i /dev/ada0
else
echo "ada0 status is funny - " $ADA0STATUS
fi
 
Status
Not open for further replies.
Top