8

I ran btrfs scrub and got this:

scrub status for 57cf76da-ea78-43d3-94d3-0976308bb4cc
    scrub started at Wed Mar 15 10:30:16 2017 and finished after 00:16:39
    total bytes scrubbed: 390.45GiB with 28 errors
    error details: csum=28
    corrected errors: 0, uncorrectable errors: 28, unverified errors: 0

OK, I have good backups, and I would like to know which files these 28 errors are in so I can restore them from backup. That would save me a lot of time over wiping and restoring the whole disk.

1

2 Answers 2

9

As @derobert pointed out in the comments, the path is to be found in the output of dmesg and looks like this:

[ 1202.714916] BTRFS warning (device dm-2): checksum error at logical 470470615040 on dev /dev/mapper/a-root, sector 923098608, root 2757, inode 1120855, offset 110592, length 4
096, links 1 (path: usr/lib/firmware/iwlwifi-3945-2.ucode)

And this command will print a list of the files to recover from backup:

dmesg| grep -e "BTRFS warning.*path:" | sed -e 's/^.*path\: //'
1

You may also be able to use journalctl if you're on a systemd-based system.

$ sudo journalctl --dmesg --grep 'checksum error'

See my full response at the thread @Livius linked above.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .