Commit edd1be3b authored by Vitaly Lipatov's avatar Vitaly Lipatov

add small scripts

parent 1010682e
#!/bin/sh
# TODO: use brick hosts
for i in snail multi cellar lav lin-test ; do
#for i in virtualbox asu nun ; do
echo
echo "Connect to $i..."
ssh $i "$@"
done
./grf --restore "$@"
#!/bin/sh
LISTVOLUME="ftp-pub"
get_bricks()
{
gluster volume info $GVOLUME | grep Brick"[0-9]" | sed -e "s|Brick[0-9]: ||g"
}
for GVOLUME in $LISTVOLUME ; do
for host in $(get_bricks | sed -e "s|:.*||g" | sort -u) ; do
ssh $host cat /var/log/glusterfs/glustershd.log && ssh $host truncate -c -s0 /var/log/glusterfs/glustershd.log
done > grfall.log
./grflog $GVOLUME grfall.log
./grf --restore --list grflog.task
done
for GVOLUME in $LISTVOLUME ; do
./grflog $GVOLUME
./grf --restore --list grflog.task
done
ADPATH=$1
for i in pub pvt tmp ; do
./glruncmd "find /var/local/eterglust/pub/$ADPATH -type f -size 0 -perm 1000 | xargs rm -v"
./glruncmd "find /var/local/eterglust2/pub/$ADPATH -type f -size 0 -perm 1000 | xargs rm -v"
# -noleaf
./glruncmd "find /var/local/eterglust/pub/$ADPATH -type f -size 0 -perm 1000 -print0 | xargs -0 rm -v"
./glruncmd "find /var/local/eterglust2/pub/$ADPATH -type f -size 0 -perm 1000 -print0 | xargs -0 rm -v"
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment