ZFS: Silent/hidden errors, nothing logged anywhere

Pawel Jakub Dawidek pjd at FreeBSD.org
Sun Jun 14 15:49:44 UTC 2009


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!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20090614/a32b59b9/attachment.pgp


More information about the freebsd-fs mailing list