# Gentoo Killing SATA Hard Drives

## Jon Wilder

Ever since I've installed Gentoo Linux, my system has had an issue with SATA hard drives. First I'll give a description of my system -

Root Drive - Maxtor 60GB PATA Hard Drive -

Partition 1 - 2MB Grub

Partition 2 - 128MB Boot

Partition 3 - 4GB Swap

Partition 4 - Rest of drive is root

Windows Data Drive - 1TB Seagate SATA drive formatted NTFS

Windows System Drive - 75GB Seagate SATA drive formatted NTFS

It seems that every time I've installed a SATA drive into this system, it ends up with bad sectors. I've tried installing Gentoo onto a 160GB SATA drive that ran a Windows 7 OS perfectly fine, then ended up with bad sectors as soon as I installed Gentoo on it. Just a few days ago, I installed Windows 7 onto the 75GB SATA drive that's in it currently. It ran fine. This morning, I booted into my Linux system without mounting the 75GB drive for any reason and did a world update. During the world update, I heard the 75GB drive make a "click" noise and the system froze for a couple of minutes, then continued running.

Upon finishing the update, I attempted to reboot into Windows on this drive, and now it will not boot past the Windows splash screen and continues to make the "click" noise at random intervals.

The "click" sound is just a single click...as if it's trying to read some part of the drive and failing.

This has now happened with two SATA drives that were perfectly fine up until I booted into my Linux system. Somehow my 1TB SATA drive is still working, but it's only a data drive.

Why does this keep happening and why only with SATA drives (PATA drives have been perfectly fine on this system)?

----------

## John R. Graham

Don't think it's Gentoo, nor Linux for that matter. By now, PATA is the exception rather than the rule. I've been running a 5-drive SATA RAID 6 array with no issues at all for nearly a year now, and smaller SATA arrays for probably 5 years.

You might want to invest in a power supply tester, though.

- John

----------

## NeddySeagoon

Jon Wilder,

Those drives sound a bit long in the tooth.  

What does smartctl -a say about them?

emerge smartmontools if you don't have it.

----------

## Roman_Gruber

did you set those smart values wrong?

you should disable power saving featues of those plater drives. else they will park quite often which ruins the drives.

smartctl -a /dev/sdX => and than smartctl => set the values to disable those power saving junk => and that has to be done on every bootup of the box (must be permanent) the drive does not remember such values at all.

did you use swap on that drive? I stopped using swap for years. even with 4gb or 3gb penryn cpu boxes.

common issue with those platter drives. well known hardware fault of those drives. 

Considering pata, 60gb, sounds like turion mt64, that was around, hmm, 8-10 years ago. my turion mt64-32 cpu had a 120 pata drive, you have 60gb pata, so

drive is around 8-10 years old. could have died with old age or wrong set smart values. 

those old pata drives are sold second hand in austra, where i live for very very low amount of cash. check your local second hand market and buy an used one... tehy are cheap regardless if 2.5" and 3.5". i even sell 5 3.5" drives with 320gb eac here in austria without anyone wanting them. one 2.5" 120gb pata drive here for sale also no requests for weeks.

some brands are prone to dying also (cough western digital 500gb sata, 3.5" cough). some models also.

--

edit

are those green / oem drives / value drives ? if so, than they are junk

personally i would stay away from western digital or samsung / ibm / hitachi

always set smartctl / smartvalues accordingly on first installing of the drives and always set those values during each bootup.

when you buy a new drive, check those test sites, data center homepages, they reveal which drive dies in which time period. some drives are dying faster as others. 

---

you may consider building your software in a ramdisc like i do, less stress on the harddrives

you may stop using swap when you have 4Gb / 3GB of ram, less stress on the harddrives

you may adjust logging / writing to the drives ...

--

Upon finishing the update, I attempted to reboot into Windows on this drive, and now it will not boot past the Windows splash screen and continues to make the "click" noise at random intervals. 

dual booting. You assume it is linux, but it could be also wrong windows settings. And we still not know which windows version, and how you set up those drives there, and how often the OS writes there on the drive, and how the power saving features are in windows.

Basically invalid topic, you assume it is gentoo linux, but as you dual boot, you know the rest, it could be but it could be not.

As i am a pure linux only user, I could claim that linux ruined my drives, if it ever happens ... But i personally kick out drives every 2 years, regardless what smart says.

the only dead drive recently was a 500 SATA 3.5" drive, which was used by a windows only user, in an external enclosure, cough... 

even an one month old drive could die. (data centers have nice statistics)

---

and also if you are using them 24/7 or only a few hours a day...

does your box overheat? if so you fry them, keep your box cool. (I talk about 50 degrees centigrade)

--

Windows Data Drive - 1TB Seagate SATA drive formatted NTFS => still available in those sizes these days, but could also be 4-5 years old

Windows System Drive - 75GB Seagate SATA drive formatted NTFS  => sounds more like a pata drive, but still very small, very very old drive.

--

it ends up with bad sectors.

something common since i use plater drives. happened since pentium 120 or even 486 days. nothing unusual.

the file system shields such things a bit from you...

just consumer drives, made for consumer and do not focus on relyability, they focus on much profit for the drive maker.

----------

## krinn

 *Jon Wilder wrote:*   

> It seems that every time I've installed a SATA drive into this system, it ends up with bad sectors.

 

LOL when you will question your ability to install a drive without wrecking them?

----------

## Roman_Gruber

do you use those antistatic equipment ?

https://en.wikipedia.org/wiki/Antistatic_wrist_strap

Many guys here in austria tell me they do not use it, when i buy stuff from them on the second hand market.

i do use those with special 1MOHMS connector to the power plug.

I remember that i ruined 2mb of 4mb graphics cards 20 years ago because of static electricity.

Knowledge rules, everyone wants to tune their hardware but hardly anyone knows the basics, sigh.

----------

## eccerr0r

Might be the SATA power cable.  Doubt it's Linux/Gentoo specifically.

I've bee running a SATA 4+1 MDRAID5 for years and it's fine.  I did have a problem with this array in the past, it turned out to be a power problem - the connector was bad and a drive kept on getting kicked from the RAID.

----------

## TigerJr

If you can't use SMART technology right - please disable it in your mainboard BIOS. You should not blame gentoo in all your problems . In other words - who installed gentoo on your hard drive without testing?

P\S

No milk today - my wife has gone away @ Herman’s Hermits

----------

## mir3x

So setting apm to 128 is enough ( its default setting anyway for my drive) ?

APM set to level 128 (minimum power consumption without standby)

or higher like 254 APM  - APM set to level 200 (intermediate level without standby)?

BTW, John Wilder, there is nothing near HDD that might overheat, like GPU?

----------

## Roman_Gruber

Usually you set "ordinary" platter drives to that value, taht they never spin down.

They spin up during boot up and keep spinning till you turn off power or an power outage.

The drives are dying from the power saving feature, and those power on / power off cycles. Keep those to a bare minimum.

The web will explain you in detail how to set those values. 

And warning, those values have to be set during every bootup of your box. So you need to verify if htose changes are permanent. 

If you want power savings and more speed, you are better off with a 50 Euros, 250gb, 2.5" sata ssd. Pick taht drive with the lowest power consumption before you buy it, when you want to increase your power efficency.

Those platter drives were never designed for power savings anyway, or speed. They are just "backup" drives ... (personal opinion)

--

as said as the other guy already. We assume the hardware was fine and the cables were connected properly, they are not loose. the drives are mounted in a proper way and such. this are requirements, if you do not fullfill those, ... no comment. and you purchased quality cables I see it on my cheap cheapiest smartphone cables, they are not worth the cheap price they are sold for. cheap connectors, cheap cable, many issues. a proper cable has a proper diameter, proper connectors and is relyable. and buy some brand which is really a brand, not those fake brands, no name brands.

----------

## NeddySeagoon

mir3x,

APM only has two values - only the sign bit of the value in actually read.

In practice, it reduces power consumption my increasing head seek times, so the drive gets both quieter and slower.

----------

