LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 04-23-2008, 10:36 PM   #1
algogeek
Member
 
Registered: Apr 2008
Distribution: Fedora 9, Ubuntu 8.04, Ubuntu 8.04 Server
Posts: 103

Rep: Reputation: 15
Angry Alarmingly high Load_Cycle_Count - Have you checked?


Hi friends,

I recently happened to do:
Code:
smartctl -d ata -a /dev/sda|grep Load_Cycle_Count
I noticed that my hard drive's spin down frequency was too high - 2-3 times every 30 seconds or so - which is an invitation for hard drive failure.

This seems to be a bug in acpi (or should we call it some really sloppy coding?), and it will kill hard drives prematurely, and all of us know how scary hard drive crashes can be.

So, I went through something that could've been a workaround but it hardly helped. (Scripts in /etc/acpi/resume.d/ never get executed, I don't know what this guy was thinking)

The only thing that's helping is adding the code:
Code:
#!/bin/bash
if on_ac_power; then
  # on AC so don't do any head parking
  hdparm -B 254 /dev/sda
  hdparm -B 255 /dev/sda
else
  # either on battery or power status could not be determined
  # so quickly park the head to protect the disk
  hdparm -B 128 /dev/sda
fi
to /etc/init.d/acpid and restarting as soon as you resume or switch to battery (or vice versa).

In plain words, this has gotten me annoyed. I can't believe professionals who are responsible for coding stuff on linux have done something this irresponsible and have released it to the public without testing and knowing the outcomes.

Windows is bad enough, but this is like suicide.

Suggestions and workarounds welcome.

Last edited by algogeek; 04-23-2008 at 10:38 PM.
 
Old 04-23-2008, 11:09 PM   #2
elliott678
Member
 
Registered: Mar 2005
Location: North Carolina
Distribution: Arch
Posts: 977

Rep: Reputation: 72
Actually, the drive manufacturer's own power saving rules will cause this. Not all distro's set a spin down time, so the drive's defaults are used, which are pretty aggressive (128 usually).

This is mine, and for the first year I had this system, I didn't have anything set for hard drive power saving, I used the manufacturer's default. The manufacturer says the drive lasts 600,000.
Code:
193 Load_Cycle_Count        0x0012   050   050   000    Old_age   Always       -       500743

Last edited by elliott678; 04-23-2008 at 11:34 PM.
 
Old 04-24-2008, 08:37 AM   #3
algogeek
Member
 
Registered: Apr 2008
Distribution: Fedora 9, Ubuntu 8.04, Ubuntu 8.04 Server
Posts: 103

Original Poster
Rep: Reputation: 15
So which distros do set a spin down time? Fedora doesn't if its true, right?
 
Old 04-24-2008, 08:57 AM   #4
elliott678
Member
 
Registered: Mar 2005
Location: North Carolina
Distribution: Arch
Posts: 977

Rep: Reputation: 72
You can check to see what it is set at with something like:
Code:
hdparm -I /dev/sda|grep 'Advanced power management level:'
If it is 128, it likely wasn't set by the distro.
 
Old 04-24-2008, 11:04 AM   #5
algogeek
Member
 
Registered: Apr 2008
Distribution: Fedora 9, Ubuntu 8.04, Ubuntu 8.04 Server
Posts: 103

Original Poster
Rep: Reputation: 15
The thing is, how can this problem be solved? If an OS can indeed set these levels, it means that windows was behaving normally with the hardware - this number shot up only after I installed linux. So, if it is indeed hardware that is responsible, my question will again be simple - what the hell were the manufacturers thinking? Do they want people to run only Vista which overrides the BIOS settings? Is this a plan to make people running different operating systems suffer? Moreover, is this something that has been done my MS? :P

It all may seem a little wild to listen to, but my mind is so full of questions right now! Damn!!

Ah, back to the main question: how can this problem be solved?
 
Old 04-24-2008, 12:55 PM   #6
elliott678
Member
 
Registered: Mar 2005
Location: North Carolina
Distribution: Arch
Posts: 977

Rep: Reputation: 72
I think the manufacturers just set the default at medium, 128 is right in the middle of 0 and 255. Yes, Windows usually sets a higher number when it boots, I don't use it so I'm not sure what it is. That can also cause problem, if the laptop is jarred without the heads parked it can cause a lot of damage to the disk.

By setting 'hdparm -B (0-255) /dev/sda', you are fixing this "problem". The higher you set it, the less often it is going to park the heads, set 255 and it will never park the heads.

My Load_Cycle_Count has gone up 2000 since I last posted, my power management level is still 128, I'm not worried, I have a 3 year warranty left on the disk and a full backup.

Last edited by elliott678; 04-24-2008 at 12:57 PM.
 
Old 04-24-2008, 01:11 PM   #7
algogeek
Member
 
Registered: Apr 2008
Distribution: Fedora 9, Ubuntu 8.04, Ubuntu 8.04 Server
Posts: 103

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by elliott678 View Post
My Load_Cycle_Count has gone up 2000 since I last posted, my power management level is still 128, I'm not worried, I have a 3 year warranty left on the disk and a full backup.
I have a one year warranty only, But still, seeing a hard drive go to waste is frustrating, isn't it? I cannot get any peace of mind unless I know that my computer is secure.
 
Old 04-24-2008, 02:03 PM   #8
elliott678
Member
 
Registered: Mar 2005
Location: North Carolina
Distribution: Arch
Posts: 977

Rep: Reputation: 72
I'm actually curious to see how real that 600,000 load cycle lifetime is. Like I said, if it worries you, disable head parking all together and risk damaging the drive in other ways. Laptop drives are some of the least reliable things in the computer world, you should never rely on them, it's the nature of the beast. The only way to avoid it is go solid state, then you will be worrying about how many write cycles you theoretically have left.
 
Old 04-26-2008, 10:57 PM   #9
algogeek
Member
 
Registered: Apr 2008
Distribution: Fedora 9, Ubuntu 8.04, Ubuntu 8.04 Server
Posts: 103

Original Poster
Rep: Reputation: 15
Hmmm... I see. But what concerns me here is how can acpi be modified to combat this problem? Like, now, even when I've added some code to /etc/init.d/acpid , I'm having to restart the daemon everytime I resume from standby, switch to battery or switch back to AC. And in plain words that is neither intellectually stimulating nor fun. You forget it once, and your hard drive gets overloaded.

The thing is, how can I modify the acpi code to do away with this problem? Is there a way to do that?
 
Old 04-26-2008, 11:30 PM   #10
elliott678
Member
 
Registered: Mar 2005
Location: North Carolina
Distribution: Arch
Posts: 977

Rep: Reputation: 72
You'll have to modify whatever scripts your distro used for suspend/hibernation. My distro used pm-utils, I could add a hook that restarts acpid on resume if I had this problem, but acpid always resumes fine for me.

This isn't really an acpi problem, as acpi has no control over this function of the hard drive.

Last edited by elliott678; 04-26-2008 at 11:34 PM.
 
  


Reply

Tags
acpi, acpid, alarm, crash, disk, failure, hard


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Load Avg High/Phys Mem High teamh Debian 2 12-26-2006 05:03 PM
,3alpJL is empty, not checked?? maestro52 Fedora 0 09-09-2005 03:37 AM
Anyone checked out the 2.6.12.3 kernel yet? ta0kira Slackware 5 07-22-2005 05:44 AM
i checked the cds but farhan Linux - General 3 03-25-2003 06:41 PM
which is checked first 98steve600 Linux - General 1 01-31-2001 04:45 PM


All times are GMT -5. The time now is 07:22 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration