Personal computing discussed

Moderators: renee, mac_h8r1, Nemesis

 
cliffsloane
Gerbil In Training
Topic Author
Posts: 4
Joined: Tue Aug 06, 2019 12:31 pm

How to detect SATA issues when HDDs keep going bad?

Tue Aug 06, 2019 12:49 pm

First, I am sure my question has been addressed, so many apologies for duplication and bountiful thanks for a link.

I have had three hard drives go bad unusually fast in the same SATA position (/dev/sda for Linux). The latest went bad after one month powerup. I strongly suspect something from either the Board or the connectors, but do not know enough to test. If it is electricity related, will it not also harm my new SDD which I haven't yet instaled?

Are there any sensors or detector programs to diagnose the hardware involved, especially anything that may explain the drive failures?
What would I look out for when I install the SDD?

Points to consider:
a. By "going bad", I mean SMART warning about Reallocated Sectors. This has sometimes meant "bad sectors" but not in this latest one.
b. The drives I have attached here have all had no more than moderate use.
c. I have never had an issue with a failure to detect, no problem with drive temperature, and no other SMART warnings.
d. I have two other HDDs in this system, and all have been working beautifully for one year and three years respectively
e. Models that went bad have been Seagate and WD. Models that work great are WD and Toshiba.
 
just brew it!
Administrator
Posts: 53995
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: How to detect SATA issues when HDDs keep going bad?

Tue Aug 06, 2019 1:19 pm

Any chance the mounting location for that drive exposes it to excessive vibration?

"Reallocated sectors" are sectors whose contents have been relocated to a spare sector because the original spot on the media has gone bad.
Nostalgia isn't what it used to be.
 
Waco
Grand Gerbil Poohbah
Posts: 3346
Joined: Tue Jan 20, 2009 4:14 pm
Location: Los Alamos, NM

Re: How to detect SATA issues when HDDs keep going bad?

Tue Aug 06, 2019 1:25 pm

Reallocated sectors, at the beginning of a drive's lifetime, aren't super unusual. Before putting any drive into service I tend to write the whole thing 3-4 times (there are a plethora of tools to do this) followed by reading the whole drive 3-4 times. If it passes that without a constantly increasing reallocated sector count I put it into use.

In general, these errors cannot be caused by external factors. I'd expect if your voltages were bad enough to cause the drive to think it misread a sector you'd also see other types of instability and SMART errors. I second the notion that the drive should be isolated from vibration if possible, though I've rarely seen reallocated sectors due to that (and I have tested drives in very bad acoustic environments).
Desktop: X570 Gaming X | 3900X | 32 GB | Alphacool Eisblock Radeon VII | Heatkiller R3 | Samsung 4K 40" | 1 TB SX8200 Pro + 2 TB 660p + 2 TB SATA SSD
NAS: 1950X | Designare EX | 32 GB ECC | 7x8 TB RAIDZ2 | 8x2 TB RAID10 | FreeNAS | ZFS | LSI SAS
 
cliffsloane
Gerbil In Training
Topic Author
Posts: 4
Joined: Tue Aug 06, 2019 12:31 pm

Re: How to detect SATA issues when HDDs keep going bad?

Tue Aug 06, 2019 2:57 pm

Before putting any drive into service I tend to write the whole thing 3-4 times (there are a plethora of tools to do this) followed by reading the whole drive 3-4 times.


Is formatting largely the same idea?
Is this still a safe thing to do with SDDs, given their limited R/W lifespan?
Would standard benchmarking accomplish something similar?

As to vibrations, I doubt it is the issue. THere does not seem to be much vibration, and the other hard drive is in the same cage.
 
K-L-Waster
Gerbil XP
Posts: 498
Joined: Thu Feb 12, 2015 8:10 pm
Location: Hmmm, I was *here* a second ago...

Re: How to detect SATA issues when HDDs keep going bad?

Tue Aug 06, 2019 3:16 pm

If you're having trouble with devices on one specific SATA port having a higher than normal number of problems you could try moving to a different SATA port and/or swapping SATA cables.

It might even be worth getting a SATA PCI card if you don't have any other ports to try. There are some inexpensive cards out there ($20 or so) that could be used to validate whether you have a problem with drives or with the port (i.e. if the drive is fine on an add-in card but reports errors on a motherboard port possibly the motherboard port is causing issues).

Is this still a safe thing to do with SDDs, given their limited R/W lifespan?


SSDs are a different beast than HDDs. Since SSDs are entirely solid state, they typically either fail right away or they're fine until you get to the end of their R/W cycle. Speaking of which, while they do have a limited number of R/W available, it's a lot higher than the conventional wisdom may suggest. (Look up the "SSD Endurance" series of articles on this site for some background -- it's a few years old now, but gives a good idea of how hard you can push SSDs before they start to fail -- TL;DR is, you can write a ton of data to an SSD before it will fail.)
Main System: i7-8700K, ASUS ROG STRIX Z370-E, 16 GB DDR4 3200 RAM, MSI GTX 1080 TI, 1 TB CRUCIAL MX500, Corsair 550D

HTPC: I5-4460, ASUS H97M-E, 8 GB RAM, GTX 970, CRUCIAL 256GB MX100, SILVERSTONE GD09B
 
Waco
Grand Gerbil Poohbah
Posts: 3346
Joined: Tue Jan 20, 2009 4:14 pm
Location: Los Alamos, NM

Re: How to detect SATA issues when HDDs keep going bad?

Tue Aug 06, 2019 3:30 pm

cliffsloane wrote:
Is formatting largely the same idea?

Nope. Formatting generally does not write to much of the drive at all. Benchmarking can, but only if you benchmark with a file or files that essentially write every bit of available space. Filesystems generally don't work well at that point, so it's tough to actually exercise every LBA.

If you're using Ubuntu you have a slew of ways to do it, "dd" over the entire drive is pretty easy for both reading and writing. Format it with your filesystem of choice when you're done.
Desktop: X570 Gaming X | 3900X | 32 GB | Alphacool Eisblock Radeon VII | Heatkiller R3 | Samsung 4K 40" | 1 TB SX8200 Pro + 2 TB 660p + 2 TB SATA SSD
NAS: 1950X | Designare EX | 32 GB ECC | 7x8 TB RAIDZ2 | 8x2 TB RAID10 | FreeNAS | ZFS | LSI SAS
 
cliffsloane
Gerbil In Training
Topic Author
Posts: 4
Joined: Tue Aug 06, 2019 12:31 pm

Re: How to detect SATA issues when HDDs keep going bad?

Tue Aug 06, 2019 5:53 pm

Waco wrote:
cliffsloane wrote:
Is formatting largely the same idea?

Nope. Formatting generally does not write to much of the drive at all. Benchmarking can, but only if you benchmark with a file or files that essentially write every bit of available space. Filesystems generally don't work well at that point, so it's tough to actually exercise every LBA.

If you're using Ubuntu you have a slew of ways to do it, "dd" over the entire drive is pretty easy for both reading and writing. Format it with your filesystem of choice when you're done.



I have some specific questions. This may be too much detail (TL;SR) for some, so be forewarned.

You suggested DD. This may have been the onset of my troubles! About two months ago, I lost my partition table on that disk, tried to rescue them (using testdisk on Linux CLI and R-Studio in Windows), but found old files instead. So after rescuing files,I tried a wipe format using the command
dd if=/dev/zero of=/dev/sda
THis took all night to complete!!! Afterwards, first I ran badblocks (clean), then I partitioned the disk into three partitions and unallocated space. THe first 5GB was unallocated, then I installed Win 10 on sda2, Mint on sda1, and open NTFS space on sda3. For a month or so, it ran just fine. SMART passed, although I did not pay attention to the issue of reallocated secrtors.
One month later, I had that warning. One day later, Win 10 could not start. Was DD the reason?
Is there a better benchmark I can use than the one in DISKS? Perhaps I should set the range in the DISKS dialog page?
Finally, what should I do to monitor the health of the (not yet installed) SDD that is other than the typical advice?

THank you for your help in all this.
 
just brew it!
Administrator
Posts: 53995
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: How to detect SATA issues when HDDs keep going bad?

Tue Aug 06, 2019 6:17 pm

Using dd the way you did is harmless. In fact that's the recommended way to zero out a mechanical HDD. The only thing I would've changed is to add a bs=1M option to write the data in larger blocks (which will speed things up).
Nostalgia isn't what it used to be.
 
Waco
Grand Gerbil Poohbah
Posts: 3346
Joined: Tue Jan 20, 2009 4:14 pm
Location: Los Alamos, NM

Re: How to detect SATA issues when HDDs keep going bad?

Tue Aug 06, 2019 8:32 pm

just brew it! wrote:
The only thing I would've changed is to add a bs=1M option to write the data in larger blocks (which will speed things up).

Yep. Along with oflag=direct to bypass the buffer cache.

To be clear, it's only harmless if your intent is to clear the drive of all data. :) Doing that 2-3 times, followed by a dd from the drive to /dev/null a few times usually hits weak spots on disk enough for the drive to recognize a problem (if there is one).
Desktop: X570 Gaming X | 3900X | 32 GB | Alphacool Eisblock Radeon VII | Heatkiller R3 | Samsung 4K 40" | 1 TB SX8200 Pro + 2 TB 660p + 2 TB SATA SSD
NAS: 1950X | Designare EX | 32 GB ECC | 7x8 TB RAIDZ2 | 8x2 TB RAID10 | FreeNAS | ZFS | LSI SAS
 
cliffsloane
Gerbil In Training
Topic Author
Posts: 4
Joined: Tue Aug 06, 2019 12:31 pm

Re: How to detect SATA issues when HDDs keep going bad?

Tue Aug 06, 2019 9:21 pm

Waco wrote:
just brew it! wrote:
The only thing I would've changed is to add a bs=1M option to write the data in larger blocks (which will speed things up).

Yep. Along with oflag=direct to bypass the buffer cache.

To be clear, it's only harmless if your intent is to clear the drive of all data. :) Doing that 2-3 times, followed by a dd from the drive to /dev/null a few times usually hits weak spots on disk enough for the drive to recognize a problem (if there is one).


Just to make sure:
I run this command 2-3 times:
sudo dd if=/dev/zero of=/dev/sda

and this command 2-3 times after that
sudo dd if=/dev/sda of=/dev/null

and then check the numbers in SMART.

IF SO, is this a good plan for SSD, or is this just the spinning platters type?
 
just brew it!
Administrator
Posts: 53995
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: How to detect SATA issues when HDDs keep going bad?

Wed Aug 07, 2019 6:47 am

It probably won't tell you anything useful on an SSD unless the SSD is already in such bad shape that it's failing in other obvious ways. All it does is put a little extra wear on the flash.
Nostalgia isn't what it used to be.
 
himanshu5
Gerbil In Training
Posts: 5
Joined: Wed Jul 31, 2019 8:40 am

Re: How to detect SATA issues when HDDs keep going bad?

Wed Aug 07, 2019 7:24 am

In the best of cases, hard drives fail gradually, giving you the chance to react, get a copy of your data, and replace the storage device before facing a fatal failure. There are a host of signs that hint to a gradual failure of your hard drive.
 
Waco
Grand Gerbil Poohbah
Posts: 3346
Joined: Tue Jan 20, 2009 4:14 pm
Location: Los Alamos, NM

Re: How to detect SATA issues when HDDs keep going bad?

Wed Aug 07, 2019 9:13 am

cliffsloane wrote:
IF SO, is this a good plan for SSD, or is this just the spinning platters type?

You've got it correct for HDDs, but I wouldn't do the same on SSDs. The modern flash controllers are mostly smart enough to throw away zero blocks (or at least compress them like crazy), so doing the above tests does basically nothing on most SSDs. Further, because of the way they map out LBAs to internal flash erase blocks on the fly, you can't be sure you've touched every block even if you overwrite it many many times. For SSDs if they survive a few decent sized benchmarking runs they're generally not going to die on you immediately.
Desktop: X570 Gaming X | 3900X | 32 GB | Alphacool Eisblock Radeon VII | Heatkiller R3 | Samsung 4K 40" | 1 TB SX8200 Pro + 2 TB 660p + 2 TB SATA SSD
NAS: 1950X | Designare EX | 32 GB ECC | 7x8 TB RAIDZ2 | 8x2 TB RAID10 | FreeNAS | ZFS | LSI SAS

Who is online

Users browsing this forum: No registered users and 5 guests
GZIP: On