Commit d27f68af authored by Vitaly Lipatov's avatar Vitaly Lipatov

update gluster scripts

parent d63af16c
#!/bin/bash
personal="snail lin-test nun lav asu multi euclid"
personal="snail lin-test nun lav asu multi euclid download"
servers="cellar windsor vbox space1 localhost"
#No 32-bit:
#personal="snail lin-test lav"
#servers="windsor vbox space1"
hosts="$personal $servers"
clients="atlant grape ant builder64"
clients="grape ant builder64"
# builder builder64"
......@@ -28,6 +28,7 @@ gfs_stop(){
run_on_hosts monit stop glusterd
run_on_hosts killall glusterd
run_on_hosts killall glusterfsd
#echo "Nothing to do"
}
gfs_start(){
......@@ -70,15 +71,19 @@ gfs_mount_plus(){
sleep 1
#service nfs restart
exportfs -r
echo 'Restarting nginx on download'
ssh download 'bash -s' <<< "service nginx restart"
}
case $1 in
all)
run_on_hosts epmi --auto glusterfs3-server
run_on_hosts epmI --auto glusterfs3-server
gfs_stop
gfs_start
run_on_hosts mount -a
run_on_clients 'epmi --auto glusterfs3-client; umount /var/ftp/*; killall glusterfs; mount -a'
run_on_clients 'epmI --auto glusterfs3-client; umount /var/ftp/*; killall glusterfs; mount -a'
#run_on_clients 'epmI --auto glusterfs3-client; mount -a'
gfs_mount_plus
exit 0
;;
......@@ -87,7 +92,7 @@ case $1 in
exit 0
;;
install)
run_on_hosts epmi --auto glusterfs3-server
run_on_hosts epmI --auto glusterfs3-server
exit 0
;;
noinstall)
......@@ -123,7 +128,7 @@ case $1 in
exit 0
;;
clients)
run_on_clients 'epmi --auto glusterfs3-client; umount /var/ftp/*; killall glusterfs; mount -a'
run_on_clients 'epmI --auto glusterfs3-client; umount /var/ftp/*; killall glusterfs; mount -a'
exit 0
;;
remount)
......@@ -132,7 +137,11 @@ case $1 in
gfs_mount_plus
exit 0
;;
set_ver)
gluster volume set all cluster.op-version $2
exit 0
;;
*)
echo 'One word is needed as arg: query, simulate, policy, start, stop, mount, mount_plus, remount, install, noinstall, all, clients. Try again...'
echo 'One word is needed as arg: query, simulate, policy, start, stop, mount, mount_plus, remount, install, noinstall, all, clients, set_ver ###. Try again...'
;;
esac
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