Computer ForumsComputers  

Go Back   Computer Forums > PC Technology Zone > Linux, BSD, other *nixes & Open Source Software

Reply
 
LinkBack Thread Tools Display Modes
Old 10-31-2007, 07:00 PM   #1 (permalink)
Osiris
Security/Hacking Mod
 
Osiris's Avatar
 
Join Date: Jan 2005
Location: USA
Posts: 23,013
Default Ubuntu Causing Laptop HDD Failure?

Ubuntu Causing Laptop HDD Failure?

Has there been an update to this Ubuntu kills laptop HDDs story? It keeps popping up but I haven’t seen anything else on it in a while. Anyone? Thanks to Vashypooh for reminding me about this one.

When switching to battery power, /etc/acpi/power.sh issues the command hdparm -B 1 to all block devices. This leads to extremely frequent load cycles. For example, my new thinkpad has already done well over 7000 load cycles -- in only 100 hours. That's at least one unloading per minute. Googling for "load unload cycles notebook OR laptop" shows that most laptop drives handle up to 600,000 such cycles. As these values clearly show, this issue is of high importance and should be fixed sooner rather than later.
Osiris is offline   Reply With Quote
Old 11-01-2007, 05:16 AM   #2 (permalink)
Disillusion
\m/ Metalhead \m/
 
Disillusion's Avatar
 
Join Date: Nov 2005
Posts: 799
Default Re: Ubuntu Causing Laptop HDD Failure?

This problem is easily fixed by

Code:
sudo hdparm -B 255 [location of your drive, usually /dev/sda1]
This will completely disable the feature. What it does (that I've noticed) is puts your drive on standby when idling. By default it does it frequently, which is hard on the drive. Best thing to do is pick a number between 1 and 255. The higher the number, the less it will go into standby from idling, 255 will completely disable it though.
__________________
CPU: Intel Q6600 B3 @ 3.0 GHz
Cooler: Tuniq Tower 120
Mobo: Gigabyte GA-P35-DS3L
RAM: G.Skill 4 GB DDR2 800
GPU: EVGA 8800GT Superclocked 512 MB
HDD: 2 x Seagate Barracuda 160 GB
PSU: OCZ StealthXStream 600W
Case: Cooler Master Centurion 5
Disillusion is offline   Reply With Quote
Old 11-02-2007, 12:10 PM   #3 (permalink)
Osiris
Security/Hacking Mod
 
Osiris's Avatar
 
Join Date: Jan 2005
Location: USA
Posts: 23,013
Default Re: Ubuntu Causing Laptop HDD Failure?

The Ubuntu operating system has been charged with crimes against hard drives. A number of users have complained this week about the OS (7.04/7.10) forcing drives to spin up and down at an unnatural rate due to some very aggressive power management features. According to Ubuntu wizards, however, this is a firmware/BIOS issue and not the OS's fault.
A couple of user forums have started fill up with people commenting about their systems going through an unusual number of load cycles while under battery power. This excessive throttling of the hard drive could lead to quicker than expected hardware failures.
document.write('\x3Cscript src="http://ad.uk.doubleclick.net/adj/reg.main_hardware.4159/pc_chips;'+RegExCats+GetVCs()+'pid='+RegId+';'+Reg KW+'maid='+maid+';test='+test+';pf='+RegPF+';dcove =d;sz=336x280;tile=3;ord=' + rand + '?" type="text/javascript">\x3C\/script>');
One user complains, "When switching to battery power, /etc/acpi/power.sh issues the command hdparm -B 1 to all block devices. This leads to extremely frequent load cycles. For example, my new thinkpad has already done well over 7000 load cycles -- in only 100 hours.
"That's at least one unloading per minute. Googling for "load unload cycles notebook OR laptop" shows that most laptop drives handle up to 600,000 such cycles."
This best explanation we've found of the hard drive mechanics at play comes from Linux-Hero.
The drive reported has a life span of 600,000 load/unload cycles before the precisely machined tolerances in the drive begin to deteriorate. Somewhere along the line, the drives are being asked to spin down very frequently. These are factors controlled by a power management utility within the drive called Advanced Power Management, or apm, and are dictated by Ubuntu after boot-up. The problem is simply that the drives are spinning up and down too often, and the sliders are being forced to roll on and off the ramp where they’re stored when in off use, causing wear and tear on the slider assembly (not to mention the motor spinning the drive).
But the Ubuntu nation contends that it's the laptop makers who are after aggressive power management that are causing the problems.
One blogger writes that the issues are OS independent. "These aggressive power management settings are set by your BIOS or harddrive firmware. Windows and/or Mac OS X might be overriding these settings which might make Ubuntu look bad if Ubuntu doesn’t override these settings."
Meanwhile, an Ubuntu developer explains that the OS creators have tried to avoid messing with the BIOS and firmware setting provided by hardware makers. So, this hands off approach can lead to major hard drive wear and tear, but that's what the laptop vendors intended.
According to Linux-Hero, you can fix the problem by running hdparm -B 255 /dev/sda. This will shut down the advanced power management features of your hard drive. A number of users have confirmed that this workaround has helped them as well. (Of course, your hard drive my eventually catch on fire, which would also lessen its lifespan.)
It looks like Hitachi, IBM/Lenovo and Dell units are all mentioned as potential culprits. And, if you hear you hard drive clicking, you're almost certainly suffering from this condition.
Good luck


Ubuntu laptop clan trapped in hard drive **** | The Register
Osiris is offline   Reply With Quote
Old 11-02-2007, 08:29 PM   #4 (permalink)
Disillusion
\m/ Metalhead \m/
 
Disillusion's Avatar
 
Join Date: Nov 2005
Posts: 799
Default Re: Ubuntu Causing Laptop HDD Failure?

I've discovered that by editing /etc/acpi/power.sh should cure the problem permanently.

There is a line that says
Code:
function laptop_mode_enable {
    $LAPTOP_MODE start
    
    for x in /sys/bus/ide/devices/*/block; do 
	drive=$(basename $(readlink $x));
	$HDPARM -S $SPINDOWN_TIME /dev/$drive 2>/dev/null
	$HDPARM -B 1 /dev/$drive 2>/dev/null
    done
    
    for x in /sys/bus/scsi/devices/*/block; do 
	drive=$(basename $(readlink $x));
	$HDPARM -S $SPINDOWN_TIME /dev/$drive 2>/dev/null
	$HDPARM -B 1 /dev/$drive 2>/dev/null
    done
}

function laptop_mode_disable {
    for x in /sys/bus/ide/devices/*/block; do 
	drive=$(basename $(readlink $x));
	$HDPARM -S 0 /dev/$drive 2>/dev/null
	$HDPARM -B 255 /dev/$drive 2>/dev/null
    done
    for x in /sys/bus/scsi/devices/*/block; do 
	drive=$(basename $(readlink $x));
	$HDPARM -S 0 /dev/$drive 2>/dev/null
	$HDPARM -B 255 /dev/$drive 2>/dev/null
    done
    $LAPTOP_MODE stop
}
As you can see, when it is in laptop mode, it's doing hdparm -B 1 which is the most aggressive power saving feature for the HDD, which will cause it to constantly go into standby. If you change this to a more realistic number, like 150-200, then it should be better. Or you can completely disable it by changing the number from 1 to 255.
__________________
CPU: Intel Q6600 B3 @ 3.0 GHz
Cooler: Tuniq Tower 120
Mobo: Gigabyte GA-P35-DS3L
RAM: G.Skill 4 GB DDR2 800
GPU: EVGA 8800GT Superclocked 512 MB
HDD: 2 x Seagate Barracuda 160 GB
PSU: OCZ StealthXStream 600W
Case: Cooler Master Centurion 5
Disillusion is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HDD configuration with Windows XP- an odd question Kisskerven Building, Buying, or Upgrading High Performance PC Systems 6 10-21-2007 12:56 AM
XP PC networked with Vista laptop mnelson07 Computer Networking & Internet Access 9 08-06-2007 10:57 AM
User Locked Out of Account....Its Weird Though.... qbbraveheart Computer Networking & Internet Access 2 05-07-2007 01:58 PM


All times are GMT. The time now is 12:13 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8