0

Here is a zfs pool with checksum errors:

    NAME        STATE     READ WRITE CKSUM
    pool0       ONLINE       0     0    42
      c1t1d0    ONLINE       0     0    30
      c1t2d0    ONLINE       0     0    19
      c1t3d0    ONLINE       0     0    16
      c1t4d0    ONLINE       0     0    24

errors: Permanent errors have been detected in the following files:

    pool0/scratch:<0x80>

Is there a way to find which files / metadata have blocks with checksum errors?

Mark Wagner
  • 18,019
  • 2
  • 32
  • 47
  • 1
    Can you share what happened to cause pool corruption? – ewwhite Mar 11 '14 at 17:55
  • 2
    Run a scrub, it might list off a file once it gets to it on the disk. That is only possible if the damage is actually in the file and not in metadata AND 'scratch' isn't a zvol (if it's a zvol, ZFS has no clue what file structure is inside). – Nex7 Mar 11 '14 at 18:47
  • 2
    Oh, and stop making non-redundant pools. That thing has CKSUM errors because there's no ZFS-level redundancy in place, so it can't correct them automatically. – Nex7 Mar 11 '14 at 18:47
  • I should have mentioned I already ran the scrub. `scratch` is a zfs filesystem. It had a corrupted file that I deleted but that error message lingers. I was thinking there might be some zdb commands that would give more info. N.B. I'm not asking for zfs best practices or how to construct a zfs pool that has redundancy. :) – Mark Wagner Mar 11 '14 at 23:04
  • Do you have any snapshots? They often are a culprit for errors showing up even after the offending file is gone. – Nex7 Mar 26 '14 at 21:51
  • Yes, I have ~30 snapshots. – Mark Wagner Mar 26 '14 at 21:57

1 Answers1

4

Normally, the path and name of the file with the error would be displayed, the <0x80> suggests the corrupted file was deleted (before or after the error). It is a reference to the indirect block that contained the file. This suggests that no active files were corrupted, just a file that was already deleted, or has since been deleted.

Allan Jude
  • 1,286
  • 9
  • 13