Dave wrote:
> On 05/08/2008 08:11 AM, Ross wrote:
>   
>> It may be an obvious point, but are you aware that snapshots need to be 
>> stopped any time a disk fails?  It's something to consider if you're 
>> planning frequent snapshots.
>>     
>
> I've never heard this before. Why would snapshots need to be stopped for 
> a disk failure?
>   

Because taking a snapshot makes the scrub start over.  I hadn't thought 
about this extending to a resilver, but I guess it would!

Anyway, I take frequent snapshots on my home ZFS server, and I got tired 
of a 90 minute scrub that started over every 60 minutes.  So, I put the 
following code snipped into my snapshot-management script:

    # Is a scrub in-progress?  If so, abort
    if [ ! $(zpool status | grep -c 'scrub in progress' ) == 0 ]
    then
            exit -1;
    fi
      

Now I skip a couple of snashots a day, but I can run a daily scrub to 
make sure that my photos and the code from my undergraduate CS projects 
are being coherently stored.

To solve the resilver problem, change the "grep" statement to something 
like "egrep -c 'scrub in progress|resilver in progress' ".

-Luke

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to