svn commit: r261894 - in head/etc: . devd

Andriy Gapon avg at FreeBSD.org
Fri Feb 14 15:31:49 UTC 2014


Author: avg
Date: Fri Feb 14 15:31:48 2014
New Revision: 261894
URL: http://svnweb.freebsd.org/changeset/base/261894

Log:
  move devd rules for zfs events into a separate file and fix stale event types
  
  Also, extend with some new events.
  Additionally, tag syslog messages with 'ZFS' instead of using explicit "ZFS: "
  prefix in the messages themselves.
  
  Tested by:	Daniel O'Connor <doconnor at gsoft.com.au>
  MFC after:	8 days
  Sponsored by:	HybridCluster

Added:
  head/etc/devd/zfs.conf   (contents, props changed)
Modified:
  head/etc/devd.conf
  head/etc/devd/Makefile

Modified: head/etc/devd.conf
==============================================================================
--- head/etc/devd.conf	Fri Feb 14 15:21:21 2014	(r261893)
+++ head/etc/devd.conf	Fri Feb 14 15:31:48 2014	(r261894)
@@ -246,37 +246,6 @@ notify 10 {
 	action "logger -p kern.emerg 'WARNING: system temperature too high, shutting down soon!'";
 };
 
-# Sample ZFS problem reports handling.
-notify 10 {
-	match "system"		"ZFS";
-	match "type"		"zpool";
-	action "logger -p kern.err 'ZFS: failed to load zpool $pool'";
-};
-
-notify 10 {
-	match "system"		"ZFS";
-	match "type"		"vdev";
-	action "logger -p kern.err 'ZFS: vdev failure, zpool=$pool type=$type'";
-};
-
-notify 10 {
-	match "system"		"ZFS";
-	match "type"		"data";
-	action "logger -p kern.warn 'ZFS: zpool I/O failure, zpool=$pool error=$zio_err'";
-};
-
-notify 10 {
-	match "system"		"ZFS";
-	match "type"		"io";
-	action "logger -p kern.warn 'ZFS: vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'";
-};
-
-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'";
-};
-
 # User requested suspend, so perform preparation steps and then execute
 # the actual suspend process.
 notify 10 {

Modified: head/etc/devd/Makefile
==============================================================================
--- head/etc/devd/Makefile	Fri Feb 14 15:21:21 2014	(r261893)
+++ head/etc/devd/Makefile	Fri Feb 14 15:31:48 2014	(r261894)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-FILES=	uath.conf usb.conf
+FILES=	uath.conf usb.conf zfs.conf
 
 .if ${MACHINE} == "powerpc"
 FILES+=	apple.conf

Added: head/etc/devd/zfs.conf
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/etc/devd/zfs.conf	Fri Feb 14 15:31:48 2014	(r261894)
@@ -0,0 +1,77 @@
+# $FreeBSD$
+#
+# Sample ZFS problem reports handling.
+
+notify 10 {
+	match "system"		"ZFS";
+	match "type"		"fs.zfs.checksum";
+	action "logger -p kern.warn -t ZFS 'checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'";
+};
+
+notify 10 {
+	match "system"		"ZFS";
+	match "type"		"fs.zfs.io";
+	action "logger -p kern.warn -t ZFS 'vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'";
+};
+
+notify 10 {
+	match "system"		"ZFS";
+	match "type"		"fs.zfs.data";
+	action "logger -p kern.warn -t ZFS 'pool I/O failure, zpool=$pool error=$zio_err'";
+};
+
+notify 10 {
+	match "system"		"ZFS";
+	match "type"		"fs.zfs.zpool";
+	action "logger -p kern.err -t ZFS 'failed to load zpool $pool'";
+};
+
+notify 10 {
+	match "system"		"ZFS";
+	match "type"		"fs.zfs.vdev\..*";
+	action "logger -p kern.err -t ZFS 'vdev problem, zpool=$pool path=$vdev_path type=$type'";
+};
+
+notify 10 {
+	match "system"		"ZFS";
+	match "type"		"fs.zfs.io_failure";
+	action "logger -p kern.alert -t ZFS 'catastrophic pool I/O failure, zpool=$pool'";
+};
+
+notify 10 {
+	match "system"		"ZFS";
+	match "type"		"fs.zfs.probe_failure";
+	action "logger -p kern.err -t ZFS 'vdev probe failure, zpool=$pool path=$vdev_path'";
+};
+
+notify 10 {
+	match "system"		"ZFS";
+	match "type"		"fs.zfs.log_replay";
+	action "logger -p kern.err -t ZFS 'pool log replay failure, zpool=$pool'";
+};
+
+notify 10 {
+	match "system"		"ZFS";
+	match "type"		"fs.zfs.config_cache_write";
+	action "logger -p kern.warn -t ZFS 'failed to write zpool.cache, zpool=$pool'";
+};
+
+
+notify 10 {
+	match "system"		"ZFS";
+	match "type"		"resource.fs.zfs.removed";
+	action "logger -p kern.notice -t ZFS 'vdev is removed, pool_guid=$pool_guid vdev_guid=$vdev_guid'";
+};
+
+notify 10 {
+	match "system"		"ZFS";
+	match "type"		"resource.fs.zfs.autoreplace";
+	action "logger -p kern.info -t ZFS 'autoreplace is configured for vdev, pool_guid=$pool_guid vdev_guid=$vdev_guid'";
+};
+
+notify 10 {
+	match "system"		"ZFS";
+	match "type"		"resource.fs.zfs.statechange";
+	action "logger -p kern.notice -t ZFS 'vdev state changed, pool_guid=$pool_guid vdev_guid=$vdev_guid'";
+};
+


More information about the svn-src-all mailing list