On 20 Feb 2024 12:51 -0500, from hunguponcont...@gmail.com (Default User): > But since the sector already can not be read, How can it be re-written > to a "good" sector?
Generally, it can't. It will be remapped if necessary when something else is written to that sector. > If I knew which file (if any) is using the bad sector, I could try just > deleting that file from the "bad" drive, then copy the same file over > from the "Good" drive, at which time the bad sector "should" be > retired, and replaced by a good sector. Assuming ext[234]fs, it looks like you can use tune2fs, udisks and debugfs to determine the pathname to the file at a given LBA offset. See http://www.randomnoun.com/wp/2013/09/12/determining-the-file-at-a-specific-vmdk-offset/ -- Michael Kjörling 🔗 https://michael.kjorling.se “Remember when, on the Internet, nobody cared that you were a dog?”