Skip to content

Instantly share code, notes, and snippets.

@agranig
Created May 6, 2013 09:15
Show Gist options
  • Save agranig/5524164 to your computer and use it in GitHub Desktop.
Save agranig/5524164 to your computer and use it in GitHub Desktop.
Bootstrap glusterfs on sp1
#!/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