On 2014-05-09 20:01, Hugo Mills wrote:
On Fri, May 09, 2014 at 06:58:27PM +0100, Hugo Mills wrote:
On Fri, May 09, 2014 at 08:02:45PM +0200, laie wrote:
> Now I'm looking for a way to tell btrfs to provide me with a list of the
> corrupted files and delete them afterwards. This would be great, because
> otherwise it would take very long to get the data back from slow backups.
Simple solution: cat every file to /dev/null, and see which ones
fail with an I/O error. With RAID-0 data, losing a device is going to
damage most files, though, so don't necessarily expect much to
survive.
Actually, you could cat just the first 256 KiB of each file to
/dev/null -- that should be sufficient, because with RAID-0, the
stripe size is 64 KiB, and 256 KiB is therefore 4 stripes, and so
should cover every device... :)
I was hoping for an internal tool, but I guess the matter is to
specific. Thank you for the fast and easy solution.
Are you sure that using only 256KiB covers also huge files, even if only
the last Part is missing?
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html