Re: OT: finding damaged files on an XFS filesystem (Was Re: OT: fastest way to copy one drive to another)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

On Thu, 20 Sep 2018 19:06:08 -0500 Ranjan Maitra wrote:

> 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.

You can use "ddrescue --fill-mode" using this mapfile and the healthy
disk then "grep -rl" to find the files that had bad blocks.

For example:

    echo BAD-SECTOR > BAD-SECTOR
    ddrescue --fill-mode='l?*-' BAD-SECTOR /dev/Your_Healthy_Disk mapfile &

    # mount /dev/Your_Healthy_Disk

    grep -rl BAD-SECTOR Mount_Point

Adjust the value of the --fill-mode option according to your
mapfile. In my recent case I only had 

    '?' 	non-tried block 
    '*' 	failed block non-trimmed 

The l is to write also the location data.

Ref: https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html#Fill-mode

-- 
Francis
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux