ZFS scrub is finished?

Steve Bertrand steve at ibctech.ca
Sat Jul 11 20:37:21 UTC 2009


xorquewasp at googlemail.com wrote:
> On 2009-07-11 15:08:04, Steve Bertrand wrote:

>> Perhaps it is as simple as cron-ing something like the following (of
>> course, replace "zpool scrub" with my cat commands.

> Problem is that 'zpool scrub' immediately returns with a success
> error code if command line option parsing went OK and the specified
> pools actually exist. You have to manually check the output of 'zpool status'
> to see if the scrub executed with no errors (and that may be hours
> later).

Ok. What is your ultimate goal? Is it to:

- run the first scrub
- search for an "ok" err status upon return
- begin the second scrub

If (in your case) the first scrub fails, is it still feasible to run the
second scrub anyway? If it is, then chaining the commands together
*should* work (however, I've never tested whether '&&' will continue
upon certain 'failures', but so long as the first command _exits_, you
should be alright).

If your X doesn't finish correctly, and then you can't run Y because of
it, what would you be looking for in the following manual output to
signify error?

%zpool status
  pool: storage
 state: ONLINE
 scrub: scrub completed after 2h50m with 0 errors on Thu Jul  9 11:56:39
2009
config:

        NAME        STATE     READ WRITE CKSUM
        storage     ONLINE       0     0     0
          raidz1    ONLINE       0     0     0
            ad0     ONLINE       0     0     0
            ad2     ONLINE       0     0     0
            ad4     ONLINE       0     0     0
            ad6     ONLINE       0     0     0

errors: No known data errors

Steve

ps. I use ZFS in a limited capacity... I'm just trying to help write a
wrapper if one doesn't currently exist.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3233 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20090711/544ccc44/smime.bin


More information about the freebsd-questions mailing list