Unsolved
This post is more than 5 years old
1 Rookie
•
92 Posts
0
443
November 1st, 2012 18:00
What's a faster way to start 100 replications after a switchover?
Rather than going to the replications page and clicking 400 times and waiting for the page to refresh? Is there a better way from the gui, or should this be a script? If a script, what does that look like and how do you get the input?
Thanks!
No Events found!
Disk Jockey
1 Rookie
•
92 Posts
0
November 1st, 2012 18:00
Cool, thanks for the quick reply. Do you have a sample script? I'm not a scripting guru and Sandy has given us a real beating the last few days...
dynamox
9 Legend
•
20.4K Posts
0
November 1st, 2012 18:00
get list of sessions:
nas_replicate -l
use awk/grep and assign session ids into an array and operate against that list.
dynamox
9 Legend
•
20.4K Posts
0
November 1st, 2012 19:00
Lets' say all your session names started with repl, something like this:
[nasadmin@NS40CS ~]$ nas_replicate -l
Name Type Local Mover Interconnect Celerra Status
Repl_NDBFS9 filesystem server_2 -->src_interconnect EUNS40CS OK
Repl_NDBFS1 filesystem server_2 -->src_interconnect EUNS40CS OK
Repl_NDBFS5 filesystem server_2 -->src_interconnect EUNS40CS OK
LIST=`nas_replicate -l |grep -i Repl | awk '{print $1}'`
echo $LIST
for i in $LIST
do
echo "nas_replicate -switchover ..blah blah" $i
done
try with one command to make sure it does what you wanted it to do and then copy a bunch of commands that got echo'ed to the screen and paste.
umichklewis
3 Apprentice
•
1.2K Posts
0
November 2nd, 2012 05:00
That's a great start! I highly, highly recommend sleep statements in the script. Each switchover command generates an entry in the database and takes (wall clock) time to process. A whole pile of switchovers guarantees at least a few may hang or fail to start, as the database may bog down getting them all queued. I'd throw a 15 or 30 sleep in, which really wouldn't hurt.