LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Analyze hard disk: broken or not? (https://www.linuxquestions.org/questions/linux-newbie-8/analyze-hard-disk-broken-or-not-4175672356/)

Pironman 04-01-2020 11:25 AM

Analyze hard disk: broken or not?
 
1 Attachment(s)
Good morning, with the utlity Disk, I can see that my hard drive have 104 broken sectors, as you can see in the attached file.
So, I run:

Code:

sudo badblocks -sv /dev/sda
And it say no sector broken.
Who tells lies?

Thanks

rknichols 04-01-2020 12:51 PM

No lies. There are 104 bad sectors that the drive has reallocated to spare sectors. The bad sectors are thus hidden from the OS, and badblocks will not see them.

Having 104 reallocated sectors is not a good sign. When a drive has more than just a few reallocated sectors, it is common for more sectors to fail, and for that to occur at an accelerating pace. New bad sectors will be visible to the OS and cause I/O errors until those sectors are reallocated. That reallocation can occur the next time the OS writes to those sectors. S.M.A.R.T will not declare the drive to have failed until it has used almost all of its spare sectors, but that is far beyond the point at which most people would find the drive unusable because of I/O errors.

Pironman 04-01-2020 01:11 PM

So, it's better to change it?
I bought it just 2 years ago, why so many broken sectors in just 2 years?

remmilou 04-01-2020 01:20 PM

Quote:

Originally Posted by Pironman (Post 6106722)
So, it's better to change it?
I bought it just 2 years ago, why so many broken sectors in just 2 years?

I've been working for over 16 years is computer forensics en we had hundreds and hundreds of (brand new) disks of all brands and sizes.
I've seen lots of faulty disks in less then a year. Sometimes a bad batch, sometimes completely random.
On the other hand I've seen drives working good after 20 years.
It's just the way it is. You have to live with that.
And rknichols is right. It will get worse. Replace it if you love your data. Keep it running if you love experiments.

Pironman 04-01-2020 03:32 PM

Thank you.
Another question, more pertinent with this website: Could I see where are these ruined sector? If I had loose data in my home directory, or somewere?
usually, once a week, I make a backup in other two hard drive, using rsync, could this operation have ruined the hard drive? and, could I made another backup right now, or this operation will damage more the hard drive?
Thanks

sevendogsbsd 04-01-2020 04:07 PM

Rsync will not ruin the hard drive. The failure is due to hardware. Good thing you are making backups, many people do not do that.

rknichols 04-01-2020 09:17 PM

Quote:

Originally Posted by Pironman (Post 6106753)
Another question, more pertinent with this website: Could I see where are these ruined sector? If I had loose data in my home directory, or somewere?

You cannot see which sectors were reallocated. However, the drive reallocates a bad sector only when that sector is being written to. At that point, the previous contents are irrelevant -- they were being overwritten anyway. Sectors that are found to be bad but are not yet reallocted are called "Current Pending Sectors" in the "smartctl -A" output. Those sectors will cause an I/O error when read, and will also cause the drive's self test to fail at that location.

If you wish, you can post the output from "smartctl -A /dev/sda" for evaluation. Please wrap that in [CODE] ... [/CODE] tags, since it is quite hard to read when the formatting is lost.

Soadyheid 04-02-2020 04:47 AM

104 bad sectors on a 1Tb disk is likely to be an extremely small percentage of the disk. Disks usually have at least two spare cylinders of spare sectors to allow for bad sector reallocation. We're probably talking thousands of spare sectors if not tens of thousands. Hard disks are designed to handle bad blocks.

The number of bad blocks is not the indicator of how bad the disk is, you have to keep monitoring it periodically as it's the rate of increase in registered bad blocks that shows if it's on the way out. Most disks of the flying rust persuasion which I've come across have had some bad blocks but the numbers are generally stable and the disks have spun and been accessed for years.

Play Bonny!

:hattip:

fatmac 04-02-2020 06:09 AM

Even new disks come with some bad sectors marked out of use.
As above, it is the rate at which they grow that matters.

Pironman 04-05-2020 09:15 AM

one months ago are none. Right now it's again 104, they are not growing.

P.S. I bought a new pc, this one is very old and this is the right opportunity to replace it with a new one.
But I will continue to use this pc for not important things, and I check how much life it has


All times are GMT -5. The time now is 07:34 AM.