diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2010-10-28 07:02:44 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-10-28 20:42:45 -0700 |
commit | 8ea6882c424afd3f18ad1273ec31d34f5d74e47e (patch) | |
tree | 650c0454c5a36314ec83b26e3393dacd94886574 /extras/test/gluster_commands.sh | |
parent | d654c29d20f24802e6c5aa24a9206377428b9359 (diff) |
script for testing glusterd sanity
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1436 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1436
Diffstat (limited to 'extras/test/gluster_commands.sh')
-rwxr-xr-x | extras/test/gluster_commands.sh | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/extras/test/gluster_commands.sh b/extras/test/gluster_commands.sh index 5e7aea6fbcd..6774f226281 100755 --- a/extras/test/gluster_commands.sh +++ b/extras/test/gluster_commands.sh @@ -20,6 +20,15 @@ # This script tests the basics gluster cli commands. +echo "Starting glusterd" +glusterd +if [ $? -ne 0 ]; then + echo "Could not start glusterd.Exiting" + exit; +else + echo "glusterd started" +fi + if [ ! -d "/exports" ]; then mkdir /exports; mkdir /exports/exp{1..10}; @@ -59,20 +68,29 @@ sleep 1 echo "replacing brick......" gluster volume replace-brick vol `hostname`:/exports/exp1 `hostname`:/exports/exp3 start +#sleep for 5 seconds +sleep 5 gluster volume replace-brick vol `hostname`:/exports/exp1 `hostname`:/exports/exp3 status gluster volume replace-brick vol `hostname`:/exports/exp1 `hostname`:/exports/exp3 pause gluster volume replace-brick vol `hostname`:/exports/exp1 `hostname`:/exports/exp3 status gluster volume replace-brick vol `hostname`:/exports/exp1 `hostname`:/exports/exp3 start +#sleep for 5 seconds +sleep 5 gluster volume replace-brick vol `hostname`:/exports/exp1 `hostname`:/exports/exp3 status gluster volume replace-brick vol `hostname`:/exports/exp1 `hostname`:/exports/exp3 commit echo "replcing brick for abort operation" gluster volume replace-brick vol `hostname`:/exports/exp3 `hostname`:/exports/exp1 start +#sleep for 5 seconds +sleep 5 gluster volume replace-brick vol `hostname`:/exports/exp3 `hostname`:/exports/exp1 status gluster volume replace-brick vol `hostname`:/exports/exp3 `hostname`:/exports/exp1 pause gluster volume replace-brick vol `hostname`:/exports/exp3 `hostname`:/exports/exp1 status gluster volume replace-brick vol `hostname`:/exports/exp3 `hostname`:/exports/exp1 start +#sleep for 5 seconds +sleep 5 +gluster volume replace-brick vol `hostname`:/exports/exp3 `hostname`:/exports/exp1 status gluster volume replace-brick vol `hostname`:/exports/exp3 `hostname`:/exports/exp1 abort @@ -96,7 +114,7 @@ umount /mnt/client df -h echo "deleting distribute volume......" -gluster volume delete vol +gluster --mode=script volume delete vol gluster volume info sleep 1 @@ -124,10 +142,14 @@ sleep 1 echo "replacing-brick....." gluster volume replace-brick mirror `hostname`:/exports/exp1 `hostname`:/exports/exp5 start +#sleep for 5 seconds +sleep 5 gluster volume replace-brick mirror `hostname`:/exports/exp1 `hostname`:/exports/exp5 status gluster volume replace-brick mirror `hostname`:/exports/exp1 `hostname`:/exports/exp5 pause gluster volume replace-brick mirror `hostname`:/exports/exp1 `hostname`:/exports/exp5 status gluster volume replace-brick mirror `hostname`:/exports/exp1 `hostname`:/exports/exp5 start +#sleep for 5 seconds +sleep 5 gluster volume replace-brick mirror `hostname`:/exports/exp1 `hostname`:/exports/exp5 status gluster volume replace-brick mirror `hostname`:/exports/exp1 `hostname`:/exports/exp5 commit gluster volume info @@ -135,12 +157,16 @@ sleep 1 df -h sleep 1 -echo "replacing vrick for abort operation" +echo "replacing brick for abort operation" gluster volume replace-brick mirror `hostname`:/exports/exp5 `hostname`:/exports/exp1 start +#sleep for 5 seconds +sleep 5 gluster volume replace-brick mirror `hostname`:/exports/exp5 `hostname`:/exports/exp1 status gluster volume replace-brick mirror `hostname`:/exports/exp5 `hostname`:/exports/exp1 pause gluster volume replace-brick mirror `hostname`:/exports/exp5 `hostname`:/exports/exp1 status gluster volume replace-brick mirror `hostname`:/exports/exp5 `hostname`:/exports/exp1 start +#sleep for 5 seconds +sleep 5 gluster volume replace-brick mirror `hostname`:/exports/exp5 `hostname`:/exports/exp1 status gluster volume replace-brick mirror `hostname`:/exports/exp5 `hostname`:/exports/exp5 abort @@ -164,7 +190,7 @@ umount /mnt/client df -h echo "deleting replicate volume....." -gluster volume delete mirror +gluster --mode=script volume delete mirror gluster volume info sleep 1 @@ -193,10 +219,14 @@ sleep 1 echo "replacing brick....." gluster volume replace-brick str `hostname`:/exports/exp1 `hostname`:/exports/exp5 start +#sleep for 5 seconds +sleep 5 gluster volume replace-brick str `hostname`:/exports/exp1 `hostname`:/exports/exp5 status gluster volume replace-brick str `hostname`:/exports/exp1 `hostname`:/exports/exp5 pause gluster volume replace-brick str `hostname`:/exports/exp1 `hostname`:/exports/exp5 status gluster volume replace-brick str `hostname`:/exports/exp1 `hostname`:/exports/exp5 start +#sleep for 5 seconds +sleep 5 gluster volume replace-brick str `hostname`:/exports/exp1 `hostname`:/exports/exp5 status gluster volume replace-brick str `hostname`:/exports/exp1 `hostname`:/exports/exp5 commit @@ -207,10 +237,14 @@ sleep 1 echo "replacing brick for abort operation" gluster volume replace-brick str `hostname`:/exports/exp5 `hostname`:/exports/exp1 start +#sleep for 5 seconds +sleep 5 gluster volume replace-brick str `hostname`:/exports/exp5 `hostname`:/exports/exp1 status gluster volume replace-brick str `hostname`:/exports/exp5 `hostname`:/exports/exp1 pause gluster volume replace-brick str `hostname`:/exports/exp5 `hostname`:/exports/exp1 status gluster volume replace-brick str `hostname`:/exports/exp5 `hostname`:/exports/exp1 start +#sleep for 5 seconds +sleep 5 gluster volume replace-brick str `hostname`:/exports/exp5 `hostname`:/exports/exp1 status gluster volume replace-brick str `hostname`:/exports/exp5 `hostname`:/exports/exp1 abort @@ -234,5 +268,6 @@ umount /mnt/client df -h echo "deleting stripe volume....." -gluster volume delete str +gluster --mode=script volume delete str gluster volume info + |