Created
May 6, 2013 09:15
-
-
Save agranig/5524164 to your computer and use it in GitHub Desktop.
Bootstrap glusterfs on sp1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -ex | |
DIR1=/var/lib/glusterfs/export | |
DIR2=/tmp/export-tmp | |
VOL=ngcp | |
rm -rf $DIR1 $DIR2 | |
mkdir -p $DIR1 $DIR2 | |
umount /mnt/glusterfs 1>/dev/null 2>/dev/null || true | |
set +e | |
# we know this one is offline - find better way to add peer | |
timeout 5 gluster peer probe sp2 | |
set -e | |
gluster volume create $VOL replica 2 sp1:$DIR1 sp1:$DIR2 | |
gluster volume start $VOL | |
gluster volume info $VOL | |
mount -t glusterfs sp1:$VOL /mnt/glusterfs/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment