OpenWRT USB attached disk spin-down

electrical-poweropenwrtusb

I use a couple of ASUS WL-500GP running OpenWrt Kamikaze 8.09.1 (2.4 kernel)
as small office gateways and firewall. Now I would like to attach USB disks to cache local backup-data during office-hours and send it over the net during night.

The problem is that the attached disk never spins down and gets hot and noisy.
Do anyone know of any "OK" solution to spin down idle USB attached disks in OpenWrt?

My disk device is: /dev/scsi/host0/bus0/target0/lun0/disc

I have tried hd-idle but no go, even tried to create a /dev/sda with mknod:

root@TheBrick:~# hd-idle -t sda -i 10 
ioctl on sda:: Invalid argument

root@TheBrick:~# hd-idle -t scsi/host0/bus0/target0/lun0/disc  -i 10   
ioctl on scsi/host0/bus0/target0/lun0/disc:: Invalid argument

Also tried "scsi-spin" but found nothing compiled for Kamikaze 8.09.1

Best Answer

Take a look at sdparm. It looks like there is an official OpenWRT package, which you should be able to install via opkg/ipkg.

Try this:

opkg update
opkg install sdparm
sdparm -v --command=stop /dev/sda