Re: ZFS: Silent/hidden errors, nothing logged anywhere

From: Pawel Jakub Dawidek <pjd_at_FreeBSD.org>
Date: Sun, 14 Jun 2009 17:49:38 +0200
On Sat, Jun 13, 2009 at 03:54:07PM -0500, James R. Van Artsdalen wrote:
> 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.

Could be, I'm most of the time just use *.* /var/log/all.log.

We could easly log directly from inside the kernel, but this is just an
example devd entry so one can replace it with, eg. mailing the problem
to the system administrator or whatever.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd_at_FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

Received on Sun Jun 14 2009 - 13:49:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:49 UTC