- Run the install-gluster.sh script on all hosts
- The scripts assume you have named your hosts gluster-1 gluster-2 and gluster-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
-
-
Save viglesiasce/36bcb7ab30668d61d3d9db97b321bd90 to your computer and use it in GitHub Desktop.
Gluster Install
This file contains hidden or 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/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.* |
This file contains hidden or 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/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