declare -A PORTMAP PORTCURR=49152 function ta_create_ta_and_volfile() { local b=$B0/$1 mkdir -p $b/.glusterfs/indices cat > $B0/ta.vol < $B0/${1}.vol < $B0/mount.vol < $B0/${1}.pid kill -9 $p } function ta_get_pid_by_brick_name() { cat $B0/${1}.pid } function ta_up_status() { local v=$1 local m=$2 local replica_id=$3 grep -E "^up = " $m/.meta/graphs/active/${v}-replicate-${replica_id}/private | cut -f2 -d'=' } function ta_create_shd_volfile() { local b0=$B0/$1 local b1=$B0/$2 local ta=$B0/$3 local b0_port=${PORTMAP[$1]} local b1_port=${PORTMAP[$2]} local ta_port=${PORTMAP[$3]} cat > $B0/glustershd.vol <