You can run fsck.ext2
with the -c
option, which will run badblocks
, create an invisible file with the blocks that fail to read, and then make sure that no two files share the same blocks. If any of these blocks are in use by another file, this shows up as a conflict, and you are given various repair options like trying to duplicate the blocks, or deleting the file.
That kind of repair cannot be performed during an automatic (-a
) run, because it involves a destructive operation. If you combine -c
and -a
, the file system check can fail, and I'm not sure if the bad blocks inode is properly constructed in that run (it should be, so you should be able to then do an interactive repair without repeating the scan).
That way, these blocks are marked as allocated and will not be used.
tune2fs
, so reformatting seems like the only option.