
Re: Mark sectors as bad - or ntfscluster -s ?
Hi,
Quote:
I already copied 450 GB from it to a fresh device using ddrescue, which can even be mounted
You had better run chkdsk on the new disk after the copy. With so many bad sectors, inconsistencies between files, directories and bitmap are likely.
Also mounting both disks at the same time may lead to problems as they will show the same uuid. Use ntfslabel to generate a new label for the new disk.
Quote:
Now my question: Luckily, ddrescue gives me a list of bad sectors. Can I import them into the file system so that ntfs-3g refuses access to files which are mapped to bad sectors? Alternatively, is there a way to give ntfs-3g a list of bad sectors?
No such way currently. Anyway, what are you trying to do ? Your new disk has supposedly no defect, so marking sectors as bad is meaningless. What would be the purpose of the tool you would like to have ?
Quote:
Or should I use ntfscluster to get the list of files which are in bad sectors?
This should work if your intention is to just delete the bad files and free the space accordingly. You will probably have to build a shell script to automate the process.
Quote:
The last resort will be to write a special bitpattern in the image where the badblocks at the original device are, copy everything and scan the files whether they have this bitpattern in it...
I do not get it. Would this be just another way to make the list of bad sectors ?
If your intention is to weed out bad files, you can also copy all files from the old disk (mounted read-only) and kill those which cannot be copied.
Regards
Jean-Pierre