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?

up vote 13 down vote accepted

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

dumpe2fs -b /dev/$partition

E.g.

dumpe2fs -b /dev/sdd1
  • @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

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

  • 2
    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

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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