hdparm does not spin down hard disk on inactivity timeout

Bug #875719 reported by Christoph Bier on 2011-10-16
72
This bug affects 14 people
Affects Status Importance Assigned to Milestone
hdparm (Ubuntu)
Undecided
Unassigned

Bug Description

First off, I'd like to mention that hdparm -S worked with 10.10. But with 11.04 my external hard disk (Seagate) connected via eSATA ExpressCard on a ThinkPad X200s doesn't spin down anymore on inactivity timeout set to 12 (1 minute). I'm still able to spin down the disk with the -y option---but a few seconds later it spins up again. This hard disk is my backup disk and only in use every 4 hours by a cron job.

Revision history for this message
Bob Harvey (bobharvey) wrote :

well, -S does not work in 10.04

Revision history for this message
Christoph Bier (christoph-bier) wrote :

Do you mean 11.04?

Revision history for this message
Christoph Bier (christoph-bier) wrote :

I upgraded to 11.10, -S still shows no effect

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in hdparm (Ubuntu):
status: New → Confirmed
Revision history for this message
Christoph Bier (christoph-bier) wrote :

I just installed hdparm v9.37 from source. I set the S option to 1 (5 seconds) and it worked. But 20 seconds later the disk spun up again (I did not access it). So I tried the Ubuntu version of hdparm with -S set to 1---and it worked, too. But the disk spun up again after 20 seconds. I guess Ubuntu's hdparm is not broken but some process accessing the disk prevents the disk to spin down which only occurs with -S set up high enough. How can I detect which process prevents the disk from spinning down?

Revision history for this message
Bob Harvey (bobharvey) wrote :

@Christoph 2011-10-08

No, 10.04. I am using the LTS version on a server

Revision history for this message
Christoph Bier (christoph-bier) wrote :

Any activity on this bug? Can I help you with some diagnostics?

Revision history for this message
Christoph Bier (christoph-bier) wrote :

Does anybody care about this bug?

Revision history for this message
Christoph Bier (christoph-bier) wrote :

Is this bug fixed in 12.04?

Revision history for this message
Christoph Bier (christoph-bier) wrote :

Please, I need help on this! I upgraded to 12.04, but the problem still exists.

Revision history for this message
Bob Harvey (bobharvey) wrote :

I have upgraded to 12.04LTS server and that does not respect /etc/hdparm.conf either.

My hdparm.conf file looks like this:
------------------------------------------------------
bob@server01:~$ cat /etc/hdparm.conf
/dev/sda{
        spindown_time = 30
        write_cache = off
        sleep
        }
/dev/sdb{
        spindown_time = 30
        write_cache = off
        sleep
        }
/dev/sdc{
        spindown_time = 30
        write_cache = off
        sleep
        }
/dev/sdd{
        spindown_time = 30
        write_cache = off
        sleep
        }

------------------------------

After a reboot my disks are active.

If I issue
sudo hdparm -Y /dev/sd{a..d}
then they go into standby.

Is there a log file that can confirm hdparm is being accessed at all?

Revision history for this message
Bob Harvey (bobharvey) wrote :

Is this a duplicate of Bug 595138 ?

Revision history for this message
Gerry (gsker) wrote :

I would say it is not. The OP on this bug reported that the drive did spin down but then spun back up.

Bug 595138 is a failure of the hdparm scripts to read /etc/hdparm.conf and properly set the spindown option.

To answer Christoph's question, here's a link to how to figure out what is accessing the drive:

http://info4admins.com/tips-to-spindown-your-hard-disk-in-debian-or-ubuntu/

Revision history for this message
Liam Tuvey (0c-liam-wz) wrote :

Can confirm bug still exists in Ubuntu 12.04.1 LTS, spindown_time in hdparm.conf is not respected.
I can spin down drives from command line using hdparm.

Revision history for this message
vsespb (vsespb) wrote :

Still issue in 12.04, even for drive with no mounted partitions. (hdparm -Y is able to sleep this drive).

Revision history for this message
Wojciech Musial (wojciech-musial) wrote :

You may want to consider hd-idle as a workaround. It checks for read/write activity and spins the drive down a la hdparm -Y after a specified timeout.

http://hd-idle.sourceforge.net/

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers