Re: ZFS errors with two HEX numbers.

From: Zaphod Beeblebrox <zbeeble_at_gmail.com>
Date: Sun, 26 Sep 2021 04:25:57 UTC
I looked through sysctl kstat.zfs --- Neither number appears.  Is there
some similar way I can list snapshots?  I thought ZFS listed snapshots when
listing them  here...?

On Sat, Sep 25, 2021 at 7:20 PM Alan Somers <asomers@freebsd.org> wrote:

> On Sat, Sep 25, 2021 at 4:01 PM Miroslav Lachman <000.fbsd@quip.cz> wrote:
> >
> > On 25/09/2021 21:28, Zaphod Beeblebrox wrote:
> > > I've got a ZFS pool --- 3 x 8 x 4T disks in a RAIDZ2 configuration.
> Every
> > > few months I scrub them.  This time, curiously, it came up with an
> error.
> > > All the disks in a vdev simultaneously give an error when this is
> > > scanned.... thusly:
> > >
> > >            raidz2-3      ONLINE       0     0     0
> > >              gpt/v1-f0   ONLINE       0     0     1
> > >              gpt/v1-f1   ONLINE       0     0     1
> > >              gpt/v1-f2   ONLINE       0     0     1
> > >              gpt/v1-f3   ONLINE       0     0     1
> > >              gpt/v1-f4   ONLINE       0     0     1
> > >              gpt/v1-f5   ONLINE       0     0     1
> > >              gpt/v1-f6a  ONLINE       0     0     1
> > >              gpt/v1-f7b  ONLINE       0     0     1
> > >
> > > ... and if I add -v to the status, I see the following right now:
> > >
> > > errors: Permanent errors have been detected in the following files:
> > >          <0x57b2>:<0x73ab46>
> > >
> > > Now... since that happened, I have scrubbed twice more.  The first
> number
> > > changes each time.  Last scrub it was: <0x4223>:<0x73ab46>.  Note the
> last
> > > number is not changing.
> > >
> > > I have done some googling and found that this might be something that
> got
> > > corrupted on delete or somesuch.  My OCD would like to know what 0x4223
> > > maps to (or now 0x57b2) s.t. I could find it and remove it.  I _think_
> this
> > > is a snapshot reference?
> >
> > I have seen this in the past. It was corruption on some deleted file
> > preserved on snapshot. Once I deleted snapshots this error disappeared.
> >
> > [...]
> >
> > Miroslav Lachman
>
> I believe the first number is the objset number, where the objset can
> be either a dataset or a snapshot.  The corrupt block likely exists in
> multiple snapshots, but "zpool status" will show only one, whichever
> it happened to find first.  You can see the objset numbers for
> datasets (but not snapshots) in the output of "sysctl kstat.zfs".  The
> second number I believe is the object number, and that should never
> change.
>