GlusterFS Distributed Filesystem Configuration
This project creates a distributed filesystem on two servers using GlusterFS.
Building the VMs
- Download and install VirtualBox.
- Download and install Vagrant.
- [Mac/Linux only] Install Ansible.
ansible-galaxy install -r requirements.ymlin this directory to get the required Ansible roles.
vagrant upto build the VMs and configure the infrastructure.
When Vagrant is finished provisioning the VMs with Ansible, run the following two commands to confirm that Gluster is operating nominally:
# Get status for the Gluster cluster. $ ansible gluster -i inventory -a "gluster peer status" -b # Get volume info for the Gluster cluster. ansible gluster -i inventory -a "gluster volume info" -b
You can also do the following to confirm that files are being replicated/distributed correctly:
- Log into the first server:
vagrant ssh gluster1
- Create a file in the mounted gluster volume:
sudo touch /mnt/gluster/test
- Log out of the first server:
- Log into the second server:
vagrant ssh gluster2
- List the contents of the gluster directory:
You should see the
test file you created in step 2; this means Gluster is working correctly!