On 14 Sep 2023 12:17 +0200, from vinc...@vinc17.net (Vincent Lefevre): > badblocks says that there are 25252 bad blocks. > > I'm using ddrescue before doing anything else (mainly in case things > would go worse), but I would essentially be interested in knowing > which files are affected.
There's always the brute-force way; for each ordinary file, try to cat it to /dev/null, and log the name of the file if that fails. Alternatively, since you have an on-disk offset, you might be able to use `debugfs -R "stat <filename>"` or `hdparm --fibmap <filename>` or `filefrag -e <filename>` for each file visible to figure out which file name(s) map to that location on disk. I couldn't immediately find a convenient way to go from an on-disk offset to a file name directly. -- Michael Kjörling 🔗 https://michael.kjorling.se “Remember when, on the Internet, nobody cared that you were a dog?”