LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   marking bad sectors of a hard disk (https://www.linuxquestions.org/questions/linux-software-2/marking-bad-sectors-of-a-hard-disk-4175600855/)

lin66uxx 03-01-2017 11:53 AM

marking bad sectors of a hard disk
 
Dear all,

Technician said that my hard disk is broken with bad sectors, when I ran badblocks tool under debian 8.7 it found 4 bad sectors only on a Toshiba HDD 500GB hard disk, is there any way to mark those sectors as bad while the partition in which they are located is mounted ?

thnx,

rknichols 03-01-2017 12:48 PM

On any modern disk, simply writing (anything) to those sectors will allow the drive to reallocate them to spare sectors and preserve the appearance of an error-free disk. The only challenge in the procedure is determining what file(s) were using those sectors so that you know what data might have been corrupted. It is for this that the Bad Block HOWTO was written. Much of that can be done with the drive/partition mounted.

lin66uxx 03-01-2017 12:58 PM

Thanks rknichols,

What is considered modern disk? I bought the laptop late 2012 .

Is 4 bad blocks considered very few and maybe negligible problem or it is an indicator of the disk becoming old ? usually after how much bad sectors that the disk need to be replaced?

Is it possible that those sectors were already bad at the time of manufacturing the disk or every new disk is bad sectors free?

thnx,

jefro 03-01-2017 03:14 PM

I like to run OEM hard drive diags for the best results. They tend to offer a long test that can ferret out any problems.

I'd think 4 isn't too much. Laptops might be under heavy abuse and could result in more than what a desktop might produce.

szboardstretcher 03-01-2017 03:20 PM

In the case of newer drives - the drive controller itself marks bad blocks. No need to do it with software Afaik.

rknichols 03-01-2017 05:39 PM

Quote:

Originally Posted by lin66uxx (Post 5677682)
What is considered modern disk? I bought the laptop late 2012 .

Pretty much anything since about 2004 (the origin of S.M.A.R.T), and probably quite a bit earlier than that.
Quote:

Is it possible that those sectors were already bad at the time of manufacturing the disk or every new disk is bad sectors free?
No. Bad sectors found during manufacture are mapped out by a slightly different method and are not visible in the SMART attributes.

sundialsvcs 03-01-2017 05:49 PM

As rknichols refers to, all current disk-drives contain on-the-drive technology which performs self-diagnostics, logging, and sector sparing. This facility is called S.M.A.R.T., or, if you don't care for all those periods, just SMART.

The smartctl utility provides access to this facility in Linux.

In this way, the issue of "bad sectors" is effectively removed from being an operating-system concern and becomes a device's concern. ("Very nice!")

My advice is: "run it, and if the drive is beginning to self-report any significant number of problems, just get rid of the damned thing." :)


All times are GMT -5. The time now is 03:00 PM.