LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-01-2017, 11:53 AM   #1
lin66uxx
Member
 
Registered: Oct 2012
Distribution: debian11
Posts: 212

Rep: Reputation: Disabled
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,
 
Old 03-01-2017, 12:48 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
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.

Last edited by rknichols; 03-01-2017 at 12:49 PM.
 
Old 03-01-2017, 12:58 PM   #3
lin66uxx
Member
 
Registered: Oct 2012
Distribution: debian11
Posts: 212

Original Poster
Rep: Reputation: Disabled
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,
 
Old 03-01-2017, 03:14 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,991

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
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.
 
Old 03-01-2017, 03:20 PM   #5
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
In the case of newer drives - the drive controller itself marks bad blocks. No need to do it with software Afaik.
 
Old 03-01-2017, 05:39 PM   #6
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by lin66uxx View Post
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.

Last edited by rknichols; 03-01-2017 at 05:42 PM.
 
Old 03-01-2017, 05:49 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,665
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
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."

Last edited by sundialsvcs; 03-01-2017 at 05:51 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Hard Disk Bad Sectors Help sunnieside-up Linux - Hardware 6 11-30-2011 08:06 PM
[SOLVED] Bad sectors on Hard Disk dsenic2000@yahoo.com Debian 5 03-17-2011 02:07 AM
HARD DISK BAD SECTOrS zoetrope87 Linux - Hardware 7 03-02-2007 05:16 PM
HARD DISK BAD SECTOrS zoetrope87 Linux - Software 2 01-12-2006 03:54 AM
marking bad sectors in linux joe56 Linux - Software 1 06-14-2004 09:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration