[Pkg-zfsonlinux-devel] [SCM] zfs branch, master, updated. upstream/0.6.5.5-688-g6c129e3

Aron Xu aron at debian.org
Tue Apr 26 09:27:16 UTC 2016


The following commit has been merged in the master branch:
commit 6c129e36330c2e7e96c9aa093bac465f14e1e778
Author: Aron Xu <aron at debian.org>
Date:   Tue Apr 26 17:26:36 2016 +0800

    Scrub all healthy pools monthly from Richard Laager

diff --git a/debian/tree/zfsutils/usr/lib/zfs-linux/scrub b/debian/tree/zfsutils/usr/lib/zfs-linux/scrub
new file mode 100755
index 0000000..29b7709
--- /dev/null
+++ b/debian/tree/zfsutils/usr/lib/zfs-linux/scrub
@@ -0,0 +1,9 @@
+#!/bin/sh -eu
+
+# Scrub all healthy pools.
+zpool list -H -o health,name 2>&1 | \
+	awk 'BEGIN {FS="\t"} {if ($1 ~ /^ONLINE/) print $2}' | \
+while read pool
+do
+	zpool scrub "$pool"
+done
diff --git a/debian/zfsutils-linux.cron.d b/debian/zfsutils-linux.cron.d
new file mode 100644
index 0000000..5d8b7fc
--- /dev/null
+++ b/debian/zfsutils-linux.cron.d
@@ -0,0 +1,2 @@
+# Scrub the second Sunday of every month.
+24 0 8-14 * * root [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/scrub ] && /usr/lib/zfs-linux/scrub

-- 
OpenZFS on Linux



More information about the Pkg-zfsonlinux-devel mailing list