Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jun 2009 15:54:07 -0500
From:      "James R. Van Artsdalen" <james-freebsd-current@jrv.org>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        freebsd-fs@FreeBSD.org, Kip Macy <kip.macy@gmail.com>, FreeBSD Current <freebsd-current@FreeBSD.org>, Thomas Backman <serenity@exscape.org>
Subject:   Re: ZFS: Silent/hidden errors, nothing logged anywhere
Message-ID:  <4A3411EF.5000307@jrv.org>
In-Reply-To: <20090613150627.GB1848@garage.freebsd.pl>
References:  <920A69B1-4F06-477E-A13B-63CC22A13120@exscape.org>	<3c1674c90906121401s19105167vf4535566321b45de@mail.gmail.com> <20090613150627.GB1848@garage.freebsd.pl>

index | next in thread | previous in thread | raw e-mail

Pawel Jakub Dawidek wrote:
>
> We do log such errors. Solaris uses FMA and for FreeBSD I use devd. You
> can find the following entry in /etc/devd.conf:
>
> notify 10 {
>         match "system"          "ZFS";
>         match "type"            "checksum";
>         action "logger -p kern.warn 'ZFS: checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'";
> };
>
> If you see nothing in your logs, there must be a bug with reporting the
> problem somewhere or devd is not running (it should be enabled by
> default).
>   

Looking at vsyslog(3), I don't think logger(1) can ever log with
facility KERN.  LOG_KERN is 0, so this in vsyslog

          /* Set default facility if none specified. */
          if ((pri & LOG_FACMASK) == 0)
                 pri |= LogFacility;

will always change the KERN facility is to LogFacility, which defaults
to LOG_USER.
 
So the devd output is really going to user.warn and a syslog.conf line like

kern.*                                          /var/log/kernel.log

will capture kernel messages, but not the devd logger output, and if you
look in kernel.log you won't find the checksum errors.



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A3411EF.5000307>