On Wed, 12 Sep 2018 18:02:58 +1000 Cameron Simpson <cs(a)cskk.id.au> wrote:
On 12Sep2018 08:35, Cameron Simpson <cs(a)cskk.id.au> wrote:
>On 11Sep2018 15:11, Ranjan Maitra <maitra(a)email.com> wrote:
>>There is also xfs_repair: will this utility find the affected files?
>Short answer: I don't actually know. It may be more useful to run it
>against the bad drive because if those blocks are file data blocks
>then on the bad drive it _may_ register them as bad and report; on the
>new drive they may just look like blocks of zero bytes because
>ddrescue will have filled them in.
>However, you _also_ need to run it against the new drive, because if
>the bad blocks were filesystem structure black (as opposed to file data
>blocks) then your filesystem will be corrupt anyway.
Just to followup to this, xfs_repair(8) has this interesting paragraph:
xfs_repair aborts on most disk I/O errors. Therefore, if you are trying
to repair a filesystem that was damaged due to a disk drive failure,
steps should be taken to ensure that all blocks in the filesystem are
readable and writable before attempting to use xfs_repair to repair the
filesystem. A possible method is using dd(8) to copy the data onto a
So it may abort on your old drive. I suspect that if it completes on the old
drive that just means it didn't access any bad sectors. That may not mean the
copies on the good drive are good if their _data_ sectors were bad (and filled
with zeroes by dd_rescue).
You definitely need to run it against the good drive as well.
I am sorry to return to this, but I am still struggling to find out the answer to how to
find files that had bad blocks in my old drive.
To recap, in order to rescue a failing disk with an xfs filesystem, I used ddrescue to
copy the contents to an identically sized, but healthy disk.
The mapfile from ddrescue clearly indicated several bad sectors.
ddrescue on the new disk found no problems, but I know there are affected files (the
source disk was over 95% full), and I would like to know what those files are called.
I have seen help for ntfs
and various other filesystems
nothing for xfs.
Does anyone know how to identify these files?
Many thanks for more pointers,
Important Notice: This mailbox is ignored: e-mails are set to be deleted on receipt.
Please respond to the mailing list if appropriate. For those needing to send personal or
professional e-mail, please use appropriate addresses.