From: Alan J. Pippin Date: Mon, 12 Jan 2009 07:44:01 +0000 (-0700) Subject: Added logging to zfs-scrub X-Git-Url: http://git.pippins.net/embedvideo/.git/images/x.gif?a=commitdiff_plain;h=753ccca8d8d22675da30abf49bdda584aa5878ba;p=zfs-ubuntu%2F.git Added logging to zfs-scrub Changed zfs-replicate pool name to backups Fixed snapname bug in zfs-autosnap --- diff --git a/zfs-autosnap b/zfs-autosnap index 2493e0b..cfe80aa 100755 --- a/zfs-autosnap +++ b/zfs-autosnap @@ -130,8 +130,8 @@ for snapshot in $snapshots; do case $((snapminutes2 % window)) in 0) ;; *) - snapname=$(echo "$snapshot" | - sed 's,/\(.*\)/.zfs/snapshot/\(.*\),\1@\2,') + snapname=${filesystem}$(echo "$snapshot" | + sed 's,/\(.*\)/.zfs/snapshot/\(.*\),@\2,') destroy "$snapname" ;; esac @@ -140,8 +140,8 @@ for snapshot in $snapshots; do window=$((window*2)) done if [ $maxagedays -gt 0 ] && [ $age -gt $((maxagedays * 24 * 60)) ]; then - snapname=$(echo "$snapshot" | - sed 's,/\(.*\)/.zfs/snapshot/\(.*\),\1@\2,') + snapname=${filesystem}$(echo "$snapshot" | + sed 's,/\(.*\)/.zfs/snapshot/\(.*\),@\2,') destroy "$snapname" fi done diff --git a/zfs-replicate b/zfs-replicate index 3e8813d..7f93696 100755 --- a/zfs-replicate +++ b/zfs-replicate @@ -7,7 +7,7 @@ remote=$1 remote_fs=$2 # change to match the name of the local backup pool -local_pool=backpool +local_pool=backups # The ssh connection doesn't find zfs without this. zfs=/usr/sbin/zfs diff --git a/zfs-scrub b/zfs-scrub index 6488beb..dffe080 100755 --- a/zfs-scrub +++ b/zfs-scrub @@ -6,6 +6,8 @@ # running at any given time. This serializes the zfs # scrub process for any pool. +exec >> /var/log/zfs/zfs-scrub.log 2>&1 + PATH=/usr/sbin:/sbin:/etc/bin:$PATH pools="$*"