LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-24-2011, 11:37 PM   #1
SHENGTON
Member
 
Registered: Sep 2008
Posts: 93

Rep: Reputation: 15
Question Question About Repairing Bad Sectors


Hello, good noon.

Just came up my mind about repairing the bad sectors using software.

Does using a software really repair the bad sectors in the hard disk?

Thanks and God bless.
 
Old 05-25-2011, 01:12 AM   #2
DanceMan
Member
 
Registered: Mar 2009
Location: Vancouver BC
Posts: 101

Rep: Reputation: 22
After running the manufacturer scans on hard drives and finding bad sectors, I've followed the suggestion to "repair bad sectors." If I then run the scan again it's almost always just found more bad sectors. You should consider a hard drive with bad sectors to be highly questionable. I would toss it after getting your data off it. It can't be trusted and will most likely just waste a lot of your time.
 
Old 05-25-2011, 10:25 AM   #3
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 17.3 and 18 at present.
Posts: 1,244

Rep: Reputation: 266Reputation: 266Reputation: 266
All disks have bad block files on them as you can't manufacture a perfect disc (SSAs are probably different)
Running a verification pass on the disk using whetever diagnostic software causes the data to be read from each sector, test info written to the sector and then read back and compared. If the written and read data is the same it'll re-write the original data back to the sector. If the compare fails, it'll write the data to a spare sector on the disk which lies in a separate protected area of the disk, it then writes the a pointer from the failing address to the re-vectored address in the bad block file, so the data is accessed at its new location next time it's read.

The occasional bad block or sector shouldn't be worried about as the disk hardware is made to carry out this function transparently; The OS doesn't need to know.

However... If you start to see an increase in bad blocks being reported, then you should consider replacing the disk. You can have thousands of bad blocks re-vectored dependant on the size of the protected area on the disk (Usually two alternate cylinders so it depends on the No of heads, sectors, block size, etc)

If you're concerned, backup your data by all means, but don't go buying a new 1Tb disk because it's had one block or sector replaced!

Play Bonny!
 
Old 05-25-2011, 03:45 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 16,381

Rep: Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382
Bad blocks are marked as bad by the OS. They may be good or somewhat good or really really bad.

I would not simply un-mark them. What we used to do in the old days was to make a new low level format. The chances of the formatting being exactly at the same spots would be slim. Then do regular format and test to see if the new low level fixed it.

Some malware and virus can mark them bad too.

But, no software can change how the head and platten work.
 
Old 05-26-2011, 07:11 PM   #5
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 17.3 and 18 at present.
Posts: 1,244

Rep: Reputation: 266Reputation: 266Reputation: 266
Quote:
Bad blocks are marked as bad by the OS.
The OS will generally send a single command to verify a disk specifying the start and end address (usually the whole disk) The disk verification, or formatting for that matter, is carried out by firmware on the disk, not the OS. There is no operational overhead. See:
Code:
man sg_verify
and
Code:
man sg_format
for scsi drives in particular.

As I mentioned in #2 above, once a block or sector is marked as bad on the disk, the address of that block or sector is re-vectored, or pointed to, a replacement block/sector within the alternate cylinders, the "marked" bad block/sector area is not used again. This process is controlled by the disk firmware.

Play Bonny!
 
Old 05-26-2011, 07:33 PM   #6
tailinlinux
Member
 
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Blog Entries: 3

Rep: Reputation: 25
On my opinion Bad Block is cause of Harddisk dumping or stops in working.

I have a 92 computers here in our company.
I encountered lot of bad sector or cad blocks problem.
46 is Linux Mandriva and 46 is Windows XP.
In mandriva i always encountered when i boot up my computer always asking me to run fsck manually.
and in XP blue screen or Error Loading system.

I found out that all computer encountered this problem are placed i a hot temperature place.
Harddisk is too hot when im opened the computer and after make the HDD cold computer start up normally and perform fsck or check disk in the drive.

So i recommend to the top management to buy and install Hard Disk Cooling System to all computer place in a hot temperature place (Production Area).

Im expecting to decrease HDD dumping in our company.
Attached Thumbnails
Click image for larger version

Name:	cooling fan for hdd.jpeg
Views:	2
Size:	10.0 KB
ID:	7133  
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
re-allocated sectors count shows 2 bad sectors, in Ubuntu 10.04 disk utility james2b Linux - Hardware 4 10-12-2010 11:16 PM
Bad sectors jnreddy Linux - Server 2 07-30-2010 01:08 PM
does it mean bad sectors? thehungrycoder Linux - Hardware 3 10-19-2009 05:52 AM
getting started with libranet: repairing from bad CDs? bleargh Linux - Newbie 2 08-03-2004 09:11 PM
Bad sectors blystovski Linux - Software 1 10-17-2001 12:18 PM


All times are GMT -5. The time now is 12:26 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration