Put a semicolon between the commands on one line so you would have, # zfs send tank/vi...@now | zfs receive Movies1/now1; zfs scrub Movies1; etc....
This will run each command in a serial fashion instead of a parallel fashion. On Sat, Oct 24, 2009 at 4:55 PM, Orvar Korvar < [email protected]> wrote: > I need to copy 1.3TB to two drives. I have two drives, called Movies1 and > Movies2. Each drive is one zpool. Thus, I have two zpools. I want identical > copies of my 1.3TB data. I want to do one command at a time, and not > simultaneous: > # zfs send tank/vi...@now | zfs receive Movies1/now1 > # zfs send tank/vi...@now | zfs receive Movies2/now2 > > I do not want to do them simultaneously. I want to do one copy, and when it > has finished copying, I want to start the next copy. So how do I do that? > > If I write both lines into a shell file and execute the shell, then the > first command will execute and return after 1 second, and then the other > command will execute 1 second later? I want the first command to execute, > which may take 2 hours, and then the other command to execute. How can I do > that? > > Actually, I want to do this: > # zfs send tank/vi...@now | zfs receive Movies1/now1 > # zfs scrub Movies1 > # zfs send tank/vi...@now | zfs receive Movies2/now2 > # zfs scrub Movies2 > > But I do not want the copying to be simultaneous. As soon as the first > "zfs..." ends, I want "zfs scrub" to start and immediately I want the second > "zfs..." to start. So Movies1 will be scrubbed while I copy again. > > Hmmm... Can I do this with && or ||? > -- > This message posted from opensolaris.org > _______________________________________________ > opensolaris-discuss mailing list > [email protected] >
_______________________________________________ opensolaris-discuss mailing list [email protected]
