LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-23-2008, 07:16 AM   #1
juice99
LQ Newbie
 
Registered: Sep 2005
Posts: 12

Rep: Reputation: 0
mark bad sectors


i have array of 3 disks, RAID 0, xfs file system, one of the disk is dieing, smartctl is showing errors... the problem is i just left for vacations i can't replace it, and it's pretty important

but the data doesnt seems to be all corrupted, just specific blocks... so is there a way to mark these sectors?

after i run xfs_repair, i was able to mount it, but it stopped working after i read the bad sector... maybe is there a way to avoid writing/reading from it, then all the other data would be untouched?

i just need to get it running, i know i should replace hdd, but i'm sure there is a way to just mark it

also, i heard that sometimes, when a poweroff occurs, and the sectori is not fully written, it appears as invalid. maybe this happend? because this error started when there was a powerdown

any ideas how to fix it without loosing most data?

my hd is 250 gb wd
 
Old 02-24-2008, 04:03 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by juice99 View Post
i have array of 3 disks, RAID 0, xfs file system, one of the disk is dieing, smartctl is showing errors... the problem is i just left for vacations i can't replace it, and it's pretty important

but the data doesnt seems to be all corrupted, just specific blocks... so is there a way to mark these sectors?

after i run xfs_repair, i was able to mount it, but it stopped working after i read the bad sector... maybe is there a way to avoid writing/reading from it, then all the other data would be untouched?

i just need to get it running, i know i should replace hdd, but i'm sure there is a way to just mark it

also, i heard that sometimes, when a poweroff occurs, and the sectori is not fully written, it appears as invalid. maybe this happend? because this error started when there was a powerdown

any ideas how to fix it without loosing most data?

my hd is 250 gb wd
The disk manufacturers provide stand alone diagnostic programs on their web sites. One of the functions that these diagnostic programs will do it check every block on your drive. If any bad block is encountered the block is reassigned to a spare block beyond the normal end of the disk. The diagnostic program will also tell you if your disk is beyond repair. This repair is destructive and erases the entire disk. I used the Western Digital diagnostic program about 5 years ago and it worked as advertised. (It told me that I had more bad blocks than spares and the disk was kaput.)

So to use this diagnostic you first have to save all of your data to backup. In your case this could be a major problem. You could try to figure out what files contain bad blocks and try copying every file but the bad files.

------------------
Steve Stites
 
Old 02-24-2008, 04:11 PM   #3
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 99
My understanding is that modern drives will automat-
ically mark and avoid bad sectors. As long as you're
not receiving filesystem errors, it means that RAID is
doing its job. Obviously you'll need to replace the
failing drive as soon as possible, since RAID can only
survive the failure of one disk.
 
Old 02-25-2008, 12:43 AM   #4
zamula
LQ Newbie
 
Registered: Feb 2008
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by carltm View Post
My understanding is that modern drives will automat-
ically mark and avoid bad sectors. As long as you're
not receiving filesystem errors, it means that RAID is
doing its job. Obviously you'll need to replace the
failing drive as soon as possible, since RAID can only
survive the failure of one disk.
Since this is RAID 0, it actually can't survive even one disk failing. However, it's sounding like the OP has a good chance of recovering most stuff.

Here are some links that might help get you started. They aren't specific to xfs, so I'm not sure what (if anything) you need to change to make them work with xfs. Hopefully someone more knowledgeable than I will chime in. And of course, make sure you check and understand the man pages thoroughly before trying something new. One thing you may want to consider is using dd (using the noerror option) as described in the first link to make a backup copy of your drive, so if this one degrades further you're not completely out. Though, I'm not sure what to do with RAID in the mix...

http://www.linux.com/feature/32026
http://forums.suselinuxsupport.de/lo...hp/t25729.html
 
  


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
How to mark bad sectors on a DVD-RAM disk? garydale Linux - Hardware 1 12-21-2007 08:21 PM
tools to mark or recover bad sectors rogerdv Linux - Software 1 07-15-2005 09:50 AM
Bad sectors tuxombie Linux - Hardware 3 01-29-2005 01:05 PM
searching 4 bad sectors zeky Linux - Software 1 12-12-2002 08:49 AM
Bad sectors blystovski Linux - Software 1 10-17-2001 12:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:37 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
Open Source Consulting | Domain Registration