X-Git-Url: http://git.pippins.net/embedvideo/.git/static/git-logo.png?a=blobdiff_plain;f=zfs-scrub;fp=zfs-scrub;h=aff4a38ee5429f728e9772202d02f1322b7afce6;hb=0bc0c53b75f7b4aa0724c5da22caed66fe69de8f;hp=1b068d41dafa0c504a6a64c5d8fbcf4cfb71c1fd;hpb=ffae499fdb9dc7c65114534338857efc6e8b0c87;p=zfs-nexenta%2F.git diff --git a/zfs-scrub b/zfs-scrub index 1b068d4..aff4a38 100755 --- a/zfs-scrub +++ b/zfs-scrub @@ -6,6 +6,8 @@ # That only 1 scrub operation is running at any given time. # This serializes the zfs scrub process for each pool. +PATH=/usr/sbin:/sbin:$PATH + maxsleeptime=360 logfile=/var/log/zfs/zfs-scrub.log @@ -14,7 +16,7 @@ do # Check to see if this zfs filesystem has a scrub being performed on it now. # If it does, we cannot perform more than one scrub operation at a time. while true; do - /sbin/zpool status | grep scrub: | grep "in progress" > /dev/null 2>&1 + zpool status | grep scrub: | grep "in progress" > /dev/null 2>&1 if [ $? == 0 ]; then # Another zpool scrub operation is already running # Wait until it is done before continuing @@ -28,7 +30,7 @@ do date=`date` echo "$date: Scrub started for zfs pool $i" >> $logfile - /sbin/zpool scrub $i + zpool scrub $i sleep 60 done