4

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

2 Answers 2

0

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
1

I'm not sure whether you have/can fetch an application, but hdparm works nice in Ubuntu Linux.

hdparm -y /dev/sdX
makes the drive enter "standby" mode, and
hdparm -Y /dev/sdX
enters sleep mode. To setup spindown time to approx 30sec, set one of these:

hdparm -B 10 /dev/sdX
hdparm -S 4 /dev/sdX

Also, this can be configured in /etc/hdparm.conf:

/dev/disk/by-label/BACKUP-HDD {
        apm = 40
        }

1
  • hdparm is available via opkg on my openwrt 19.07.0.
    – Lucas
    Nov 20, 2020 at 11:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .