Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Jun 2010 16:26:27 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        fs@freebsd.org
Subject:   Do we want a periodic script for a zfs scrub?
Message-ID:  <20100609162627.11355zjzwnf7nj8k@webmail.leidinger.net>

next in thread | raw e-mail | index | archive | help
Hi,

I noticed that we do not have an automatism to scrub a ZFS pool  
periodically. Is there interest in something like this, or shall I  
keep it local?

Here's the main part of the monthly periodic script I quickly created:
---snip---
case "$monthly_scrub_zfs_enable" in
     [Yy][Ee][Ss])
         echo
         echo 'Scrubbing of zfs pools:'

         if [ -z "${monthly_scrub_zfs_pools}" ]; then
                 monthly_scrub_zfs_pools="$(zpool list -H -o name)"
         fi

         for pool in ${monthly_scrub_zfs_pools}; do
                 # successful only if there is at least one pool to scrub
                 rc=0

                 echo "   starting scrubbing of pool '${pool}'"
                 zpool scrub ${pool}
                 echo "      consult 'zpool status ${pool}' for the result"
                 echo "      or wait for the daily_status_zfs mail, if enabled"
         done
         ;;
---snip---

Bye,
Alexander.

-- 
Fuch's Warning:
	If you actually look like your passport photo, you aren't well
	enough to travel.

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100609162627.11355zjzwnf7nj8k>