Joined: 15 Mar 2012
|Posted: Thu Mar 15, 2012 21:24 Post subject: External USB drive - spin down
I recently installed "DD-WRT v24-sp2 (12/20/11) std - build 18024" on my "TP-Link TL-WR1043ND" router for the first time and it works pretty well despite some wireless lan issues with my macbook.
Now I've connected an external 2TB drive via usb and activated the samba server. The problem I'm having is that I'ld like the drive to spin down when it hasn't been used for some time. It actually has an integrated spin-down function but it seems like it only checks if there is power on the usb-port or not. When i deactivate samba and unmount the drive it won't spin down. It only spins down when I deactivate the Core USB support in the DD-WRT webinterface. I also tried using hdparm to stop the drive, with no success.
So, I thought as a completely different approach I could write a bash script which checks if any of my PCs is running by pinging them, and if they're all down it deactivates the Core USB support. I'ld run this script every 30 minutes.
Now my question is what does this disable/enable Core USB option in the webinterface actually do and how can I do that via commandline?