xorquew...@googlemail.com wrote: > Hello. > > I'd like to write a little shell script to run 'zpool scrub' on > my disks weekly. I have two zpools. The manual page says that only > one 'scrub' can be active at a time. > > Is there any reliable way to run 'zpool scrub X' and then run > 'zpool scrub Y' when the first has finished?
Perhaps it is as simple as cron-ing something like the following (of course, replace "zpool scrub" with my cat commands. I have three commands below, the second one in place only to verify that the commands 'did the right thing' by waiting for the first to finish. Note that if your second scrub command requires the first to exit without any errors, this will not be an appropriate solution, as you'll obviously want to catch the error and cancel the second scrub: % cat a.fil && sleep 3 && cat b.fil  29821 this is a ... % this is b  Done ( cat a.fil && sleep 3 && cat b.fil ) If you want to run it at the command line, simply throw another '&' at the end of the entire command string to ensure that if your terminal terminates, the process(es) will continue thereafter. Steve
Description: S/MIME Cryptographic Signature