View bad blocks on mounted ext2/ext3/ext4 filesystem

9,923

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

dumpe2fs -b /dev/$partition

E.g.

dumpe2fs -b /dev/sdd1
Share:
9,923

Related videos on Youtube

Basilevs
Author by

Basilevs

Physicist-programmer

Updated on September 17, 2022

Comments

  • Basilevs
    Basilevs over 1 year

    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?

  • darkdragn
    darkdragn about 13 years
    @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.