You are not logged in.

#1 2016-09-07 15:57:30

From: Frankfurt
Registered: 2012-10-18
Posts: 92

[SOLVED|hdparm] HDDs spindown after 10 sec, ignoring hdparm -S setting


On my NFS, during boot, I configure my HDDs with hdparm like so:

/usr/bin/hdparm -B 127 -S 180 /dev/sdX

Running this manually also gives me:

 setting Advanced Power Management level to 0x7f (127)
 setting standby to 180 (15 minutes)
 APM_level	= 127

I would expect that they spindown after 180*5 sec = 15 min. But they spindown ~10 sec after any file access instead of waiting for 15 minutes. I can hear it and accessing any file on the hdd also blocks for ~ 3 sec until the drive has spun up again.

Now when I wait for the drive to spin down after, say, 10 sec, and issue hdparm -C /dev/sdX I get:

 drive state is:  active/idle

So the hdd still presents itself as active/idle and not in standby even though it went into standby.

I am afraid that this seriously wears down my HDDs because it spins down and up again all the time.
The HDDs are a rather modern model: ST2000VN000-1HJ164
Output of hdparm -i /dev/sdX:

Model=ST2000VN000-1HJ164, FwRev=SC60, SerialNo=W7209LTE
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=3907029168
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
 AdvancedPM=yes: unknown setting WriteCache=enabled
 Drive conforms to: Reserved:  ATA/ATAPI-4,5,6,7

 * signifies the current active mode

Please help smile

Last edited by epinephrine (2016-09-07 17:53:41)


#2 2016-09-07 16:24:45

From: Poland
Registered: 2011-04-12
Posts: 51

Re: [SOLVED|hdparm] HDDs spindown after 10 sec, ignoring hdparm -S setting

Did you try to disable spindowns completely by setting -S parameter to 0 or -B parameter to a value larger than 127??


#3 2016-09-07 17:53:03

From: Frankfurt
Registered: 2012-10-18
Posts: 92

Re: [SOLVED|hdparm] HDDs spindown after 10 sec, ignoring hdparm -S setting

If I set hdparm -B 128 /dev/sdX (not touching the -S setting), the drive doesn't spin down completely, as expected. But again after ~10 sec I hear that clicking sound that it makes when it spins down. But now, it doesn't spin down completely but apparently just goes into a lower spinning mode...

If I now touch a file and sync, there's that clicking sound, the drive spins up fully and it writes. This is now faster (~.5-1 sec) than when full spin-down was allowed (took ~3 sec).

If I now issue hdparm -S 1, the drive goes into full standby/spin-down after 5 sec, even though the -B 128 setting is higher than 127! I guess I totally misinterpreted the -B apm setting. Apparently, the apm number defines the behaviour of the drive until the standby time of -S is reached. So if I want the drive to keep fully spinning until it goes into standby, I need to set -B 254 -S 180 for 15 minutes standby timeout. Just tested it and yup, this is it.

Thanks for leading me into the right direction!


#4 2020-03-26 17:33:19

Registered: 2020-03-26
Posts: 281

Re: [SOLVED|hdparm] HDDs spindown after 10 sec, ignoring hdparm -S setting


I had the exact same problem, thought I'd solved it by applying above solution, but with 

ACTION=="add|change", KERNEL=="sd[a-z]", ATTRS{queue/rotational}=="1", RUN+="/usr/bin/hdparm -B 128 -S 180 /dev/%k"

as a udev rule, only the -B part seems to be applied. it does keep the drive from spinning down after 5 sec all tehe time but it then doesn't spin down after 15 mn... manually running hdparm -S 1 (APM 128 is set by the udev rule) does spin down the disk after 5 s.

any ideas?

Thanks and have a great day


#5 2020-03-26 21:30:07

Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 12,144

Re: [SOLVED|hdparm] HDDs spindown after 10 sec, ignoring hdparm -S setting

Please don't necrobump, especially when the topic is marked as solved: … bumping%22


Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.


Board footer

Powered by FluxBB