You are not logged in.

#1 2021-01-16 13:21:41

grisu
Member
Registered: 2020-12-07
Posts: 14

[Solved] USB Disk does not spin down with hdparm -S or hd-idle

Hello there,

I recently got a new external USB drive with a hardware RAID controller. The drive is permanently connected to my computer, but I don't want the disks to spin all the time.
First of all, the drive spins down perfectly if I use

# hdparm -y /dev/sdb

And the disks stay off as long as I don't use any application that accesses the drive.
But unfortunately, I can't get this to work with the -S parameter.

# hdparm -S 60 /dev/sdb

What I tried so far:

  • Different values for hdparm -B (127, 128, 254, 255)

  • noatime in /etc/fstab

  • Unmounting the file system

I also found hd-idle which doesn't do anything at all.

# hd-idle -t sdb

Another USB drive of mine works fine with hdparm -S and hd-idle.

Is there any chance to spin down my new USB drive automatically?

Last edited by grisu (2021-01-19 16:19:38)

Offline

#2 2021-01-19 16:19:05

grisu
Member
Registered: 2020-12-07
Posts: 14

Re: [Solved] USB Disk does not spin down with hdparm -S or hd-idle

I found a solution that works for me but may not be the cleanest one on the planet.
There is a script disk_spindown2.sh on linuxwiki.de that does the job by watching disk access and then executing hdparm -y on an idle drive.
I had to modify the script as hdparm -C was used to write the disk state to the log file what wakes my drive up. Also the usage of hdparm -y is one disk access so the idle timer was reset all the time.
But basically that is what needs to be done if hdparm -y works but nothing else.

Offline

Board footer

Powered by FluxBB