Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've ran fsck -c on the (unmounted) partition in question a while ago. The process was unattended and results were not stored anywhere (except the bad block inode).

Now I'd like to get bad block information to know if there are any problems with the hard drive. Unfortunately, partition is used in the production system and can't be unmounted.

I see two ways to get what I want:

  1. Run badblocks in read-only mode. This will probably take a lot of time and cause unnecessary burden on the system.

  2. Somehow extract information about bad blocks from the filesystem itself.

How can I view known bad blocks registered in mounted filesystem?

share|improve this question
add comment

2 Answers 2

up vote 8 down vote accepted

Have you looked into dumpe2fs? You can use it as follows:

dumpe2fs -b /dev/$partition

E.g.

dumpe2fs -b /dev/sdd1
share|improve this answer
    
@Gareth Thanks for the edit, this is my first time on the site. I'm still trying to get used to it. Have a good day. –  darkdragn May 28 '11 at 17:52
add comment

I'm not sure if you've read the man pages . If you haven't then go to here :

e2fsck command

For using the badblocks option ,

badblocks command

share|improve this answer
1  
I've reread manuals. There are four options in e2fsck that are related to badblocks -c -k -l -L. Neither on them is useful is my situation. Won't you explain your answer? –  Basilevs Mar 18 '11 at 13:21
    
I'm not an expert at this . But i've read this page some months ago . Hope this helps : bloke.com/linux/ext3/baddisk.html –  vettipayyan Mar 18 '11 at 17:36
1  
If you can't find answer , post the same question/migrate to this unix-specific SE site : unix.stackexchange.com –  vettipayyan Mar 18 '11 at 17:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.