[mythtvnz] HDD Load Cycle Count ticking over too fast [SOLVED (sort of)]

David Moore dmoo1790 at ihug.co.nz
Thu Jun 28 06:42:51 BST 2012


On 28/06/12 16:09, Stephen Worthington wrote:
> On Thu, 28 Jun 2012 12:16:25 +1200, you wrote:
>
>> Well it's official. I really am very thick. I just could not understand
>> why a non-system drive should have constant disk access when it is
>> completely idle. So I used iotop to see what was happening and sure
>> enough nothing was touching the drive. Then the penny finally dropped.
>> Of course. It's bleeding obvious. Every time you run smartctl you wake
>> up the drive so if it's parked the LCC increments by one. So by checking
>> the LCC every 15s I was causing it to increment every 15s because the WD
>> green drives intellipark every 8s.
>>
>> So now the only question is whether typical usage of the disk will cause
>> excessive load cycles. From smartctl stats it seems not. I calculate it
>> will take about 12 years to reach 300,000 cycles based on past usage. So
>> nothing to worry about after all.
>>
>> BTW observing that the interval between disk I/O on my system drive
>> (WD10EADS-00L5B1) is frequently more than 8s but the LCC count is low on
>> this drive I must have lucked out with the firmware (01.01A01) on the
>> drive, i.e., it doesn't intellipark every 8s.
>
> I think the older drives use a longer timeout, 15-20 seconds or so.  I
> remember reading something like that when I was researching my
> problems.

I think the timeout must be over a minute on my drive. Or it doesn't 
even have intellipark. I've seen intervals of around 1 minute between 
I/Os but the LCC only increments at boot.

>
> I would have thought that smartctl accessing the SMART data would not
> wake up a drive - I wonder why it does.  It seems a very bad idea that
> it should.  So maybe it is a bug in the firmware?  Or smartctl?  Or
> the SATA drivers?
>

I think the problem might be shared between WD/Linux/smartctl. I tried 
the smartctl --nocheck option:

"-n POWERMODE, --nocheck=POWERMODE
               Specifieds if smartctl should exit before performing any 
checks when the device is in a low-power mode. It may be used  to 
prevent  a  disk  from  being spun-up by smartctl. The power mode is 
ignored by default..."

but it didn't have any effect. Then I checked standby status with hdparm 
-C and got "active/idle". So used hdparm -y to force it into standby and 
that did cause smartctl to exit with "Device is in STANDBY mode, 
exit(2)". So it seems (a) Linux/smartctl can't detect the WD intellipark 
mode and (b) smartctl would probably abort even if it could detect it.

Found yet another utility called wdantiparkd which tackles the problem a 
little differently. It reads disk I/O stats from /sys/block/<dev>/stat 
to determine whether to write a file (or not) to stop intellipark. I'm 
thinking this strategy could be used a bit differently to make code that 
only intervenes when it thinks the LCC is increasing too rapidly instead 
of just keeping the heads unparked. That would allow intellipark to work 
when the disk was truly idle but stop the thrashing due to disk I/O 
frequency incompatible with intellipark.



More information about the mythtvnz mailing list