Skip to content

Instantly share code, notes, and snippets.

@viglesiasce
Last active August 1, 2016 22:33
Show Gist options
  • Select an option

  • Save viglesiasce/36bcb7ab30668d61d3d9db97b321bd90 to your computer and use it in GitHub Desktop.

Select an option

Save viglesiasce/36bcb7ab30668d61d3d9db97b321bd90 to your computer and use it in GitHub Desktop.
Gluster Install
  1. Run the install-gluster.sh script on all hosts
  2. The scripts assume you have named your hosts gluster-1 gluster-2 and gluster-3
  3. On one of the hosts, run the configure-gluster.sh script, make sure to use the proper subnet in the allow command. This subnet is where your hosts will be allowed to connect from
#!/bin/bash
gluster volume create data gluster-1:/mnt/data gluster-2:/mnt/data gluster-3:/mnt/data
gluster volume start data
# REPLACE WITH YOUR SUBNET HERE
gluster volume set allow 10.240.*
#!/bin/bash
DATA_VOLUME=/dev/sdb
DATA_DIR=/mnt
export HOSTS=(gluster-1 gluster-2 gluster-3)
sudo yum install -y epel-release
sudo yum install -y centos-release-gluster
sudo yum install -y glusterfs-server
sudo chkconfig glusterd on
sudo service glusterd start
sudo mkfs.xfs -f $DATA_VOLUME
sudo mount $DATA_VOLUME $DATA_DIR
mkdir -p /mnt/data
for i in ${HOSTS[@]}; do
gluster peer probe $i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment