Changeset 42534
- Timestamp:
- Aug 29, 2023, 9:11:20 AM (3 years ago)
- Location:
- trunk/tools/eam/rebalance
- Files:
-
- 1 added
- 7 edited
-
launch.insert.check.errors.sh (modified) (1 diff)
-
launch.insert.errors.sh (modified) (1 diff)
-
launch.insert.sh (modified) (2 diffs)
-
launch.nebstat.insert.errors.sh (added)
-
launch.rsync.check.logs.sh (modified) (1 diff)
-
launch.rsync.check.sh (modified) (1 diff)
-
launch.trash.sh (modified) (1 diff)
-
rsync.check.logs.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rebalance/launch.insert.check.errors.sh
r42314 r42534 1 1 #!/bin/csh 2 2 3 set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"3 set program = `basename $0` 4 4 5 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922 5 set run = v0 6 set version = 20230802 7 set mode = insert 6 8 7 if ($#argv == 1) then 8 if ("$1" != "launch") then 9 echo "USAGE: launch.insert.check.errors.sh launch" 10 exit 2 11 endif 12 foreach f ($list) 13 echo ssh -f $f "cd $mydir && ./launch.insert.check.errors.sh" 14 ssh -f $f "cd $mydir && ./launch.insert.check.errors.sh" 9 set srchost = (ipp100 ipp108 ipp112 ipp114) 10 set srcvol = ( 0 0 1 0) 11 set tgthost = (ipp161 ipp161 ipp162 ipp162) 12 set tgtvol = ( 0 1 0 1) 13 14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802 15 16 if ($#argv == 0) then 17 echo "USAGE: $program launch" 18 echo "USAGE: $program run (Nentry)" 19 echo " eg: $program run 1" 20 exit 2 21 endif 22 23 if ("$1" == "launch") then 24 25 # NOTE: the insert jobs run on the target machines, not source machines 26 27 set i = 1 28 while ($i <= $#srchost) 29 echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i" 30 ssh -f $srchost[$i] "cd $mydir && ./$program run $i" 31 @ i++ 15 32 end 16 33 exit 0 17 34 endif 18 35 19 set run = v0 20 set version = 20220922 36 if ("$1" == "run") then 37 if ($#argv != 2) then 38 echo "USAGE: $program run (Nentry)" 39 echo " eg: $program run 1" 40 exit 2 41 endif 21 42 22 set myhost = `hostname` 23 set Nhost = `hostname | sed s/ipp//` 43 set N = $2 24 44 25 # ipp100 - ipp117 (10 total) need to have ~7TB moved 26 # ipp123 - ipp126 ( 4 total) need to have ~9TB moved 27 # ipp134 - ipp139 ( 4 total) need to have ~12TB moved 45 set hn = $srchost[$N] 46 set hv = $srcvol[$N] 47 set tn = $tgthost[$N] 48 set tv = $tgtvol[$N] 28 49 29 set target = NONE 30 switch ($myhost) 31 # total of 23TB 32 case ipp100 33 case ipp101 34 case ipp123 35 set target = ipp153 36 breaksw; 50 set myhost = `hostname` 51 if ($hn != $myhost) then 52 echo "ERROR: need to run $mode on the source host ($hn vs $myhost)" 53 exit 3 54 endif 37 55 38 # total of 35TB 39 case ipp102 40 case ipp104 41 case ipp124 42 case ipp136 43 set target = ipp154 44 breaksw; 56 echo "running $program on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version" 57 mkdir -p $hn.$hv 45 58 46 # total of 35TB 47 case ipp105 48 case ipp108 49 case ipp125 50 case ipp137 51 set target = ipp155 52 breaksw; 59 grep ERROR /data/$hn.$hv/nebulous/??/rebalance/movefiles.$version.chk >& $hn.$hv/errors.insert.check.$version.$run & 53 60 54 # total of 23TB 55 case ipp112 56 case ipp114 57 case ipp126 58 set target = ipp156 59 breaksw; 60 61 # total of 38TB 62 case ipp115 63 case ipp117 64 case ipp134 65 case ipp139 66 set target = ipp157 67 breaksw; 68 endsw 69 70 if ("$target" == "NONE") then 71 echo "need target" 72 exit 2 61 exit 0 73 62 endif 74 75 set v = 0 ; set h = `hostname` ; set t = $target; grep ERROR /data/$h.$v/nebulous/??/rebalance/movefiles.$version.chk >& $h.$v/errors.insert.check.$version.$run &76 set v = 1 ; set h = `hostname` ; set t = $target; grep ERROR /data/$h.$v/nebulous/??/rebalance/movefiles.$version.chk >& $h.$v/errors.insert.check.$version.$run & -
trunk/tools/eam/rebalance/launch.insert.errors.sh
r42314 r42534 1 1 #!/bin/csh 2 2 3 # src machines: 4 set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139" 3 set program = `basename $0` 5 4 6 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922 5 set run = v0 6 set version = 20230802 7 set mode = insert 7 8 8 if ($#argv == 1) then 9 if ("$1" != "launch") then 10 echo "USAGE: launch.insert.errors.sh launch" 11 exit 2 12 endif 13 foreach f ($list) 14 echo ssh -f $f "cd $mydir && ./launch.insert.errors.sh" 15 ssh -f $f "cd $mydir && ./launch.insert.errors.sh" 9 set srchost = (ipp100 ipp108 ipp112 ipp114) 10 set srcvol = ( 0 0 1 0) 11 set tgthost = (ipp161 ipp161 ipp162 ipp162) 12 set tgtvol = ( 0 1 0 1) 13 14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802 15 16 if ($#argv == 0) then 17 echo "USAGE: $program launch" 18 echo "USAGE: $program run (Nentry)" 19 echo " eg: $program run 1" 20 exit 2 21 endif 22 23 if ("$1" == "launch") then 24 25 # NOTE: the insert jobs run on the target machines, not source machines 26 27 set i = 1 28 while ($i <= $#srchost) 29 echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i" 30 ssh -f $srchost[$i] "cd $mydir && ./$program run $i" 31 @ i++ 16 32 end 17 33 exit 0 18 34 endif 19 35 20 set run = v0 21 set version = 20220922 36 if ("$1" == "run") then 37 if ($#argv != 2) then 38 echo "USAGE: $program run (Nentry)" 39 echo " eg: $program run 1" 40 exit 2 41 endif 22 42 23 set myhost = `hostname` 24 set Nhost = `hostname | sed s/ipp//` 43 set N = $2 25 44 26 # ipp100 - ipp117 (10 total) need to have ~7TB moved 27 # ipp123 - ipp126 ( 4 total) need to have ~9TB moved 28 # ipp134 - ipp139 ( 4 total) need to have ~12TB moved 45 set hn = $srchost[$N] 46 set hv = $srcvol[$N] 47 set tn = $tgthost[$N] 48 set tv = $tgtvol[$N] 29 49 30 set target = NONE 31 switch ($myhost) 32 # total of 23TB 33 case ipp100 34 case ipp101 35 case ipp123 36 set target = ipp153 37 breaksw; 50 set myhost = `hostname` 51 if ($hn != $myhost) then 52 echo "ERROR: need to run $mode on the source host ($hn vs $myhost)" 53 exit 3 54 endif 38 55 39 # total of 35TB 40 case ipp102 41 case ipp104 42 case ipp124 43 case ipp136 44 set target = ipp154 45 breaksw; 56 echo "running $program on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version" 57 mkdir -p $hn.$hv 46 58 47 # total of 35TB 48 case ipp105 49 case ipp108 50 case ipp125 51 case ipp137 52 set target = ipp155 53 breaksw; 54 55 # total of 23TB 56 case ipp112 57 case ipp114 58 case ipp126 59 set target = ipp156 60 breaksw; 61 62 # total of 38TB 63 case ipp115 64 case ipp117 65 case ipp134 66 case ipp139 67 set target = ipp157 68 breaksw; 69 endsw 70 71 if ("$target" == "NONE") then 72 echo "need target" 73 exit 2 59 grep ERROR /data/$hn.$hv/nebulous/??/rebalance/insert.$version.log >& $hn.$hv/errors.insert.$version.$run & 60 exit 0 74 61 endif 75 76 set v = 0 ; set h = `hostname` ; set t = $target; grep ERROR /data/$h.$v/nebulous/??/rebalance/insert.$version.log >& $h.$v/errors.insert.$version.$run &77 set v = 1 ; set h = `hostname` ; set t = $target; grep ERROR /data/$h.$v/nebulous/??/rebalance/insert.$version.log >& $h.$v/errors.insert.$version.$run &78 79 # e.g.: ssh -f ipp127 "cd `pwd` && ./launch.insert.errors.sh" -
trunk/tools/eam/rebalance/launch.insert.sh
r42485 r42534 1 1 #!/bin/csh 2 2 3 set srclist = (ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139) 4 set tgtlist = (ipp153 ipp153 ipp154 ipp154 ipp155 ipp155 ipp156 ipp156 ipp157 ipp157 ipp153 ipp154 ipp155 ipp156 ipp157 ipp154 ipp155 ipp157) 3 set program = `basename $0` 5 4 6 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922 5 set run = v0 6 set version = 20230802 7 7 8 # manually set these values: 9 set run = v0 10 set version = 20220922 8 # set to 'insert' first, then run with 'insert.check' 9 # set mode = insert 11 10 set mode = insert.check 12 11 13 if ($#argv < 1) then 14 echo "USAGE: launch.insert.sh launch" 15 echo "USAGE: launch.insert.sh (src) (tgt)" 12 set srchost = (ipp100 ipp108 ipp112 ipp114) 13 set srcvol = ( 0 0 1 0) 14 set tgthost = (ipp161 ipp161 ipp162 ipp162) 15 set tgtvol = ( 0 1 0 1) 16 17 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802 18 19 if ($#argv == 0) then 20 echo "USAGE: $program launch" 21 echo "USAGE: $program run (Nentry)" 22 echo " eg: $program run 1" 16 23 exit 2 17 24 endif 18 25 19 if ($#argv == 1) then 20 if ("$1" != "launch") then 21 echo "USAGE: launch.insert.sh launch" 22 echo "USAGE: launch.insert.sh (src) (tgt)" 23 exit 2 24 endif 26 if ("$1" == "launch") then 27 28 # NOTE: the insert jobs run on the target machines, not source machines 25 29 26 30 set i = 1 27 while ($i <= $#srclist) 28 set src = $srclist[$i] 29 set tgt = $tgtlist[$i] 30 echo ssh -f $tgt "cd $mydir && ./launch.insert.sh $src $tgt" 31 ssh -f $tgt "cd $mydir && ./launch.insert.sh $src $tgt" 31 while ($i <= $#tgthost) 32 echo ssh -f $tgthost[$i] "cd $mydir && ./$program run $i" 33 ssh -f $tgthost[$i] "cd $mydir && ./$program run $i" 32 34 @ i++ 33 35 end … … 35 37 endif 36 38 37 if ($#argv != 2) then 38 echo "USAGE: launch.insert.sh launch" 39 echo "USAGE: launch.insert.sh (src) (tgt)" 40 exit 2 39 if ("$1" == "run") then 40 if ($#argv != 2) then 41 echo "USAGE: $program run (Nentry)" 42 echo " eg: $program run 1" 43 exit 2 44 endif 45 46 set N = $2 47 48 set hn = $srchost[$N] 49 set hv = $srcvol[$N] 50 set tn = $tgthost[$N] 51 set tv = $tgtvol[$N] 52 53 set myhost = `hostname` 54 if ($tn != $myhost) then 55 echo "ERROR: need to run $mode on the source host ($tn vs $myhost)" 56 exit 3 57 endif 58 59 echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version" 60 mkdir -p $hn.$hv 61 echo "./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &" 62 ./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run & 63 exit 0 41 64 endif 42 65 43 set src = $144 set tgt = $245 46 set v = 0 ; set h = $src; set t = $tgt; ./rebalance.mana $mode $h $v $t $v $version > & $h.$v/log.$mode.$version.$run &47 set v = 1 ; set h = $src; set t = $tgt; ./rebalance.mana $mode $h $v $t $v $version > & $h.$v/log.$mode.$version.$run &48 49 # e.g.: ssh -f ipp127 "cd `pwd` && ./launch.rsync.sh"50 51 # echo ssh $f ps ux52 # ssh $f ps ux53 # ssh $f killall mana54 # ssh $f killall find -
trunk/tools/eam/rebalance/launch.rsync.check.logs.sh
r42314 r42534 1 1 #!/bin/csh 2 2 3 set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139" 4 # set list = "ipp105 ipp108 ipp112 ipp114 ipp115 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139" 5 # set list = "ipp100 ipp101 ipp102 ipp104 ipp117" 3 set program = `basename $0` 6 4 7 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922 5 set run = v0 6 set version = 20230802 7 set stage = rsync.check.logs 8 8 9 if ($#argv == 1) then 10 if ("$1" != "launch") then 11 echo "USAGE: launch.rsync.check.logs.sh launch" 12 exit 2 13 endif 14 foreach f ($list) 15 echo ssh -f $f "cd $mydir && ./launch.rsync.check.logs.sh" 16 ssh -f $f "cd $mydir && ./launch.rsync.check.logs.sh" 9 set srchost = (ipp100 ipp108 ipp112 ipp114) 10 set srcvol = ( 0 0 1 0) 11 set tgthost = (ipp161 ipp161 ipp162 ipp162) 12 set tgtvol = ( 0 1 0 1) 13 14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802 15 16 if ($#argv == 0) then 17 echo "USAGE: $program launch (mode)" 18 echo "USAGE: $program run (mode) (Nentry)" 19 echo " eg: $program run show 1" 20 exit 2 21 endif 22 23 if ("$1" == "launch") then 24 25 set i = 1 26 while ($i <= $#srchost) 27 echo ssh -f $srchost[$i] "cd $mydir && ./$program run $2 $i" 28 ssh -f $srchost[$i] "cd $mydir && ./$program run $2 $i" 29 @ i++ 17 30 end 18 31 exit 0 19 32 endif 20 33 21 ## set the run value in rsync.check.logs.sh 22 ## set run = v2 23 set version = 20220922 34 if ("$1" == "run") then 35 if ($#argv != 3) then 36 echo "USAGE: $program run (mode) (Nentry)" 37 echo " eg: $program run show 1" 38 exit 2 39 endif 24 40 25 set myhost = `hostname` 26 set Nhost = `hostname | sed s/ipp//` 41 set mode = $2 42 set N = $3 27 43 28 set target = NONE 29 switch ($myhost) 30 # total of 23TB 31 case ipp100 32 case ipp101 33 case ipp123 34 set target = ipp153 35 breaksw; 44 set hn = $srchost[$N] 45 set hv = $srcvol[$N] 46 set tn = $tgthost[$N] 47 set tv = $tgtvol[$N] 36 48 37 # total of 35TB 38 case ipp102 39 case ipp104 40 case ipp124 41 case ipp136 42 set target = ipp154 43 breaksw; 49 set myhost = `hostname` 50 if ($hn != $myhost) then 51 echo "ERROR: need to run $stage on the source host ($hn vs $myhost)" 52 exit 3 53 endif 44 54 45 # total of 35TB 46 case ipp105 47 case ipp108 48 case ipp125 49 case ipp137 50 set target = ipp155 51 breaksw; 52 53 # total of 23TB 54 case ipp112 55 case ipp114 56 case ipp126 57 set target = ipp156 58 breaksw; 59 60 # total of 38TB 61 case ipp115 62 case ipp117 63 case ipp134 64 case ipp139 65 set target = ipp157 66 breaksw; 67 endsw 68 69 if ("$target" == "NONE") then 70 echo "need target" 71 exit 2 55 echo "running on $myhost for source $hn.$hv to target $tn.$tv for stage $stage, version $version" 56 mkdir -p $hn.$hv 57 echo "./rsync.check.logs.sh $mode $hn $hv $version $run > & $hn.$hv/log.$stage.$version.$run &" 58 ./rsync.check.logs.sh $mode $hn $hv $version $run > & $hn.$hv/log.$stage.$version.$run & 59 exit 0 72 60 endif 73 74 set h = `hostname`; ./rsync.check.logs.sh > & $h.rsync.check.logs75 76 # e.g.: ssh -f ipp127 "cd `pwd` && ./launch.rsync.check.sh" -
trunk/tools/eam/rebalance/launch.rsync.check.sh
r42314 r42534 1 1 #!/bin/csh 2 2 3 set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139" 4 # set list = "ipp105 ipp108 ipp112 ipp114 ipp115 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139" 5 # set list = "ipp100 ipp101 ipp102 ipp104 ipp117" 3 set program = `basename $0` 6 4 7 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922 5 set run = v0 6 set version = 20230802 7 set mode = rsync.check 8 8 9 if ($#argv == 1) then 10 if ("$1" != "launch") then 11 echo "USAGE: launch.rsync.check.sh launch" 12 exit 2 13 endif 14 foreach f ($list) 15 echo ssh -f $f "cd $mydir && ./launch.rsync.check.sh" 16 ssh -f $f "cd $mydir && ./launch.rsync.check.sh" 9 set srchost = (ipp100 ipp108 ipp112 ipp114) 10 set srcvol = ( 0 0 1 0) 11 set tgthost = (ipp161 ipp161 ipp162 ipp162) 12 set tgtvol = ( 0 1 0 1) 13 14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802 15 16 if ($#argv == 0) then 17 echo "USAGE: $program launch" 18 echo "USAGE: $program run (Nentry)" 19 echo " eg: $program run 1" 20 exit 2 21 endif 22 23 if ("$1" == "launch") then 24 25 set i = 1 26 while ($i <= $#srchost) 27 echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i" 28 ssh -f $srchost[$i] "cd $mydir && ./$program run $i" 29 @ i++ 17 30 end 18 31 exit 0 19 32 endif 20 33 21 set run = v2 22 set version = 20220922 34 if ("$1" == "run") then 35 if ($#argv != 2) then 36 echo "USAGE: $program run (Nentry)" 37 echo " eg: $program run 1" 38 exit 2 39 endif 23 40 24 set myhost = `hostname` 25 set Nhost = `hostname | sed s/ipp//` 41 set N = $2 26 42 27 set target = NONE 28 switch ($myhost) 29 # total of 23TB 30 case ipp100 31 case ipp101 32 case ipp123 33 set target = ipp153 34 breaksw; 43 set hn = $srchost[$N] 44 set hv = $srcvol[$N] 45 set tn = $tgthost[$N] 46 set tv = $tgtvol[$N] 35 47 36 # total of 35TB 37 case ipp102 38 case ipp104 39 case ipp124 40 case ipp136 41 set target = ipp154 42 breaksw; 48 set myhost = `hostname` 49 if ($hn != $myhost) then 50 echo "ERROR: need to run $mode on the source host ($hn vs $myhost)" 51 exit 3 52 endif 43 53 44 # total of 35TB 45 case ipp105 46 case ipp108 47 case ipp125 48 case ipp137 49 set target = ipp155 50 breaksw; 51 52 # total of 23TB 53 case ipp112 54 case ipp114 55 case ipp126 56 set target = ipp156 57 breaksw; 58 59 # total of 38TB 60 case ipp115 61 case ipp117 62 case ipp134 63 case ipp139 64 set target = ipp157 65 breaksw; 66 endsw 67 68 if ("$target" == "NONE") then 69 echo "need target" 70 exit 2 54 echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version" 55 mkdir -p $hn.$hv 56 echo "./rebalance.mana $mode $hn $hv $tn $tv $version $version.$run.chk > & $hn.$hv/log.$mode.$version.$run &" 57 ./rebalance.mana $mode $hn $hv $tn $tv $version $version.$run.chk > & $hn.$hv/log.$mode.$version.$run & 58 exit 0 71 59 endif 72 73 set v = 0 ; set h = `hostname` ; set t = $target; ./rebalance.mana rsync.check $h $v $t $v $version $version.$run.chk > & $h.$v/log.rsync.check.$version.$run &74 set v = 1 ; set h = `hostname` ; set t = $target; ./rebalance.mana rsync.check $h $v $t $v $version $version.$run.chk > & $h.$v/log.rsync.check.$version.$run &75 76 # e.g.: ssh -f ipp127 "cd `pwd` && ./launch.rsync.check.sh" -
trunk/tools/eam/rebalance/launch.trash.sh
r42314 r42534 1 1 #!/bin/csh 2 2 3 set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139" 4 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922 3 set program = `basename $0` 5 4 6 if ($#argv == 1) then 7 if ("$1" != "launch") then 8 echo "USAGE: launch.trash.sh launch" 9 exit 2 10 endif 11 foreach f ($list) 12 echo ssh -f $f "cd $mydir && ./launch.trash.sh" 13 ssh -f $f "cd $mydir && ./launch.trash.sh" 5 set run = v0 6 set version = 20230802 7 set mode = trash 8 9 set srchost = (ipp100 ipp108 ipp112 ipp114) 10 set srcvol = ( 0 0 1 0) 11 set tgthost = (ipp161 ipp161 ipp162 ipp162) 12 set tgtvol = ( 0 1 0 1) 13 14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802 15 16 if ($#argv == 0) then 17 echo "USAGE: $program launch" 18 echo "USAGE: $program run (Nentry)" 19 echo " eg: $program run 1" 20 exit 2 21 endif 22 23 if ("$1" == "launch") then 24 25 set i = 1 26 while ($i <= $#srchost) 27 echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i" 28 ssh -f $srchost[$i] "cd $mydir && ./$program run $i" 29 @ i++ 14 30 end 15 31 exit 0 16 32 endif 17 33 18 set run = v0 19 set version = 20220922 34 if ("$1" == "run") then 35 if ($#argv != 2) then 36 echo "USAGE: $program run (Nentry)" 37 echo " eg: $program run 1" 38 exit 2 39 endif 20 40 21 set myhost = `hostname` 22 set Nhost = `hostname | sed s/ipp//` 41 set N = $2 23 42 24 set target = NONE 25 switch ($myhost) 26 # total of 23TB 27 case ipp100 28 case ipp101 29 case ipp123 30 set target = ipp153 31 breaksw; 43 set hn = $srchost[$N] 44 set hv = $srcvol[$N] 45 set tn = $tgthost[$N] 46 set tv = $tgtvol[$N] 32 47 33 # total of 35TB 34 case ipp102 35 case ipp104 36 case ipp124 37 case ipp136 38 set target = ipp154 39 breaksw; 48 set myhost = `hostname` 49 if ($hn != $myhost) then 50 echo "ERROR: need to run $mode on the source host ($hn vs $myhost)" 51 exit 3 52 endif 40 53 41 # total of 35TB 42 case ipp105 43 case ipp108 44 case ipp125 45 case ipp137 46 set target = ipp155 47 breaksw; 48 49 # total of 23TB 50 case ipp112 51 case ipp114 52 case ipp126 53 set target = ipp156 54 breaksw; 55 56 # total of 38TB 57 case ipp115 58 case ipp117 59 case ipp134 60 case ipp139 61 set target = ipp157 62 breaksw; 63 endsw 64 65 if ("$target" == "NONE") then 66 echo "need target" 67 exit 2 54 echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version" 55 mkdir -p $hn.$hv 56 echo "./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &" 57 ./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run & 58 exit 0 68 59 endif 69 70 set v = 0 ; set h = `hostname` ; set t = $target; ./rebalance.mana trash $h $v $t $v $version > & $h.$v/log.trash.$version.$run &71 set v = 1 ; set h = `hostname` ; set t = $target; ./rebalance.mana trash $h $v $t $v $version > & $h.$v/log.trash.$version.$run &72 73 # e.g.: ssh -f ipp127 "cd `pwd` && ./launch.trash.sh" -
trunk/tools/eam/rebalance/rsync.check.logs.sh
r42314 r42534 1 1 #!/bin/csh 2 2 3 set run = v2 4 set version = 20220922 5 6 set showlist = 0 7 8 if ($#argv > 1) then 9 echo "USAGE: rsync.check.logs.sh [list]" 3 if ($#argv != 5) then 4 echo "USAGE: rsync.check.logs.sh [mode] (host) (volume) (version) (run)" 5 echo "mode = show or count" 10 6 exit 2 11 7 endif 12 8 13 if ($#argv == 1) then 14 if ("$1" != "list") then 15 echo "USAGE: rsync.check.logs.sh [list]" 16 exit 2 17 endif 18 set showlist = 1 9 set mode = $1 10 set myhost = $2 11 set myvol = $3 12 set version = $4 13 set run = $5 14 15 if (($mode != "show") && ($mode != "count")) then 16 echo "USAGE: rsync.check.logs.sh [mode] (host) (volume) (version) (run)" 17 echo "mode = show or count" 18 exit 2 19 19 endif 20 20 21 set myhost = `hostname` 22 23 echo "--- volume 0 ---" 24 if ($showlist) then 25 cat /data/$myhost.0/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep -v "total size" | grep -v "building file list" | grep -v "bytes received" | grep -v '^../$' | grep -v '^$' 26 cat /data/$myhost.0/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory" 21 if ($mode == "show") then 22 cat /data/$myhost.$myvol/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep -v "total size" | grep -v "building file list" | grep -v "bytes received" | grep -v '^../$' | grep -v '^$' 23 cat /data/$myhost.$myvol/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory" 27 24 else 28 cat /data/$myhost. 0/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep -v "total size" | grep -v "building file list" | grep -v "bytes received" | grep -v '^../$' | grep -v '^$' | wc -l29 cat /data/$myhost. 0/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory" | wc -l25 cat /data/$myhost.$myvol/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep -v "total size" | grep -v "building file list" | grep -v "bytes received" | grep -v '^../$' | grep -v '^$' | wc -l 26 cat /data/$myhost.$myvol/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory" | wc -l 30 27 endif 31 28 32 echo "--- volume 1 ---"33 if ($showlist) then34 cat /data/$myhost.1/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep -v "total size" | grep -v "building file list" | grep -v "bytes received" | grep -v '^../$' | grep -v '^$'35 cat /data/$myhost.1/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory"36 else37 cat /data/$myhost.1/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep -v "total size" | grep -v "building file list" | grep -v "bytes received" | grep -v '^../$' | grep -v '^$' | wc -l38 cat /data/$myhost.1/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory" | wc -l39 endif40
Note:
See TracChangeset
for help on using the changeset viewer.
