User Tools

Site Tools


freebsd:zfshealthscript

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
freebsd:zfshealthscript [2016/03/11 13:14]
tschulz [Checkpool]
freebsd:zfshealthscript [2016/03/11 13:16]
tschulz [ZFS Scrub]
Line 30: Line 30:
  
 ===== ZFS Scrub ===== ===== ZFS Scrub =====
 +  * Check to see if it's the weekend then scrub main pool
 <file bash zfsScrubOnSat.sh>​ <file bash zfsScrubOnSat.sh>​
 #!/bin/sh #!/bin/sh
  
 WEEKDAY="​`date | cut -d " " -f1`" WEEKDAY="​`date | cut -d " " -f1`"
 +POOL="​tank"​
  
 if [ ${WEEKDAY} = "​Sat"​ ] if [ ${WEEKDAY} = "​Sat"​ ]
 then then
         echo "​It'​s Saturday Running Scrub"         echo "​It'​s Saturday Running Scrub"
-        zpool scrub tank+        zpool scrub ${POOL}
 else else
         echo "​It'​s not Saturday, exiting"​         echo "​It'​s not Saturday, exiting"​
freebsd/zfshealthscript.txt · Last modified: 2017/01/18 14:06 by tschulz