Curious: permanent file error and snapshots

As indicated, this is just a quick curiosity question for someone new to ZFS (it happened while testing how ZFS does/doesn't work; no critical files in play). I figure this is an easy one for an experienced person. I'm on:
Code:
# uname -a
FreeBSD [redacted] 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec  4 09:23:10 UTC 2012
root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
and this is what I'm getting:
Code:
# zpool status -xv
  pool: pool1
 state: ONLINE
status: One or more devices has experienced an error resulting in data
        corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
        entire pool from backup.
   see: http://illumos.org/msg/ZFS-8000-8A
  scan: scrub repaired 8K in 5h53m with 18 errors on Sun Feb 10 08:26:46 2013
config:
        NAME        STATE     READ WRITE CKSUM
        pool1  ONLINE       0     0    18
          ada4      ONLINE       0     0    37
errors: Permanent errors have been detected in the following files:
        pool1@snapshot1:/<path1>/<file1>
To be clear, only 1 errored file is returned, i.e., I didn't edit out "the rest." I have only 2 snapshots on this sandbox pool and they should be identical (made the second one accidentally shortly after the first), but certainly no differences on this random data file.

Question: While I've seen the advice on what to do (that I should delete all snapshots this is on [which sounds brutal] and recover it from backup), I'm just wondering about the significance of "snapshot1" being there at all vs. just "pool1:/<path1>/<file1>".

Is that just standard format with no significance, or does it indicate that only the snapshot info is corrupted, or that maybe the file is fine when accessed from the other snapshot (which it shouldn't because the file hasn't changed)? I was just surprised to see the snapshot name there and wondered what I should make of it. Thanks for any info!
 
OK, now a little more than a curiousity, in case I would have to do this for real later ... I've destroyed the snapshots, deleted the offending file, and run a clear. Now I get this (only the pool name was changed):
Code:
# zpool status -xv
  pool: pool1
 state: ONLINE
status: One or more devices has experienced an error resulting in data
        corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
        entire pool from backup.
   see: http://illumos.org/msg/ZFS-8000-8A
  scan: scrub repaired 8K in 5h53m with 18 errors on Sun Feb 10 08:26:46 2013
config:

        NAME        STATE     READ WRITE CKSUM
        pool1  ONLINE       0     0     0
          ada4      ONLINE       0     0     0

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

        pool1:<0x1ad1>
        <0xd3>:<0x1ad1>
How does one get rid of the "permanent errors" to move on?
 
@WiiGame

Don´t think you can. For ZFS to be able to do anything about that you would need to have some form of redundancy for ZFS to self-heal. Either set "copies=2" or attach another disk to the pool to create a mirror.

/Sebulon
 
Thanks, Sebulon.

Sorry, I should have checked this first: a scrub got rid of the weird entries. All is well now.

I'm still kind of wondering about the inclusion of the snapshot name there, but it's no big deal, I guess.
 
Snapshots in ZFS are datasets in the same sense as the normal ZFS datasets are, they are just read only for the user. A snapshot that differs from the contents of the associated dataset will have some data that is unique to it and not stored anywhere else. In your case that unique data got corrupted and ZFS noticed the corruption.
 
Back
Top