Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Sep 2024 13:29:28 +0000
From:      "Dave Cottlehuber" <dch@skunkwerks.at>
To:        "Dan Mahoney (Ports)" <freebsd@gushi.org>
Cc:        questions <questions@freebsd.org>
Subject:   Re: Zpool status -- why does a suboptimal pool show as "ONLINE"?
Message-ID:  <312af967-e5bf-4e83-b48b-7c2841719373@app.fastmail.com>
In-Reply-To: <378D100E-FFE1-4DA7-9C52-219863A50A24@gushi.org>
References:  <378D100E-FFE1-4DA7-9C52-219863A50A24@gushi.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 12 Sep 2024, at 13:05, Dan Mahoney (Ports) wrote:
> Hey there all,
>
> I have a nagios check that assumes that if I have a suboptimal zfs=20
> zpool, that the word =E2=80=9CDEGRADED=E2=80=9D will appear in the out=
put.  One disk of=20
> a two-disk mirror seems to have faulted, but the pool still shows as=20
> =E2=80=9CONLINE=E2=80=9D.  I know I=E2=80=99ve seen the word =E2=80=9C=
DEGRADED=E2=80=9D in the past.  What=E2=80=99s=20
> different?
>
>   pool: zroot
>  state: ONLINE
> status: One or more devices are faulted in response to persistent erro=
rs.
>         Sufficient replicas exist for the pool to continue functioning=
 in a
>         degraded state.
> action: Replace the faulted device, or use 'zpool clear' to mark the d=
evice
>         repaired.
> config:
>
>         NAME        STATE     READ WRITE CKSUM
>         zroot       ONLINE       0     0     0
>           mirror-0  ONLINE       0     0     0
>             ada0p3  FAULTED      4   372     0  too many errors
>             ada1p3  ONLINE       0     0     0
>
> errors: No known data errors
>
> 14.1, if it matters, the disks are two innolite SATADOM=E2=80=99s.

Hi Dan

I agree that I would expect the mirror-0 at least to report DEGRADED
or similar. Hopefully one of the zfs people clarifies the logic here.

Practically, what I do is run:

    zpool status | grep -v 'with 0 errors' | sha256

and check that this hash remains the same over time. It's obviously
different for each pool. Could that help for nagios?

A+
Dave



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?312af967-e5bf-4e83-b48b-7c2841719373>