Fedora Linux Support Community & Resources Center
  #1  
Old 11th September 2005, 06:07 PM
CrystalCowboy's Avatar
CrystalCowboy Offline
Registered User
 
Join Date: Sep 2004
Posts: 536
Bad Blocks

Fedora Core 4, x86_64

I've got a SATA hard drive with a bad sector. (Part of a RAID 1 mirror set, marked as falied, also shows up in Seagate SeaTools diagnostic software)

Is there a way to convince the drive to map out the bad sector? I may be a bit confused on concepts because much of my previous experience is with SCSI drives. Do SATA drives have spare sectors to map out bad blocks, and how do I convince it to do so?
__________________
Explore the Core!
Reply With Quote
  #2  
Old 11th September 2005, 07:42 PM
Furball's Avatar
Furball Offline
Registered User
 
Join Date: Jul 2005
Location: Passau, Germany
Age: 33
Posts: 331
Both mkfs.ext2 (to create an ext2 filesystem) and fsck.ext2 (to check an ext2 filesystem) have a parameter which you can use a bad blocks list (created with badblocks)
Quote:
Originally Posted by man page of mkfs.ext2
-l filename
Read the bad blocks list from filename. Note that the block numbers in the bad block list must be generated using the same block size as used by mke2fs. As a result, the -c option to mke2fs is a much simpler and less error-prone method of checking a disk for bad blocks before formatting it, as mke2fs will automatically pass the correct parameters to the badblocks program.
-c
Check the device for bad blocks before creating the file system. If this option is specified twice, then a slower, destructive, read-write test is used instead of a fast read-only test.
So, the options are there but I don't know if these bad blocks are stored permanently on a blacklist or something similar.
__________________

Benjamin Duehring, FORWISS
Universitaet Passau, D-94030 Passau
WWW: http://www.lyxx.de/card
Reply With Quote
  #3  
Old 11th September 2005, 10:04 PM
CrystalCowboy's Avatar
CrystalCowboy Offline
Registered User
 
Join Date: Sep 2004
Posts: 536
Quote:
Originally Posted by Furball
So, the options are there but I don't know if these bad blocks are stored permanently on a blacklist or something similar.
Hmmm, it kind of matters; since I am mirroring, the filesystem gets written on the RAID device instead of directly on the physical partition.

Thanks for the info, it gives me a few more leads.
__________________
Explore the Core!
Reply With Quote
  #4  
Old 11th September 2005, 10:46 PM
CrystalCowboy's Avatar
CrystalCowboy Offline
Registered User
 
Join Date: Sep 2004
Posts: 536
Progress, I think.

I tried
$ badblocks -nsv /dev/sdb4

I think this mapped out the bad blocks, because they don't show up in subsequent scans. Once the bad area is found, you can narrow the search:
$ badblocks -nsv /dev/sdb4 46555000 46542000
I ran it several times to make sure I'd found them all.

The block numbers reported by badblocks do not match the listed bad block in /var/log/messages, apparently because badblocks counts only blocks within the partition, not on the whole disk.

Then I used mdadm to add the (repaired?) devide back into the RAID mirror set:
mdadm /dev/md2 --add /dev/sdb4

software RAID status file is /proc/mdstat
software RAID config file is /etc/mdadm.conf

It took ~ 18 minutes to rebuild a 60 GB mirror set.

Rebuilding uses less than 1% CPU time on an Athlon64 3700+, I guess most of it is I/O that is handled in the chipset.

The rebuild finished OK, I suppose I'll have to keep an eye on it.
__________________
Explore the Core!
Reply With Quote
Reply

Tags
bad, blocks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
code::blocks for f7 seeker010 Using Fedora 1 13th June 2007 10:51 AM
code::blocks !! h3x0r Programming & Packaging 13 14th April 2007 01:45 AM
What blocks fedoraforum? tashirosgt Suggestions & Feedback 3 20th May 2006 04:16 AM
Code::Blocks tomahawker Using Fedora 11 15th March 2006 03:04 PM


Current GMT-time: 08:36 (Friday, 24-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat