I’ve been experimenting with GlusterFS recently and I have found it fairly useful to be able to roll out a quick Gluster volume to play with. Vagrant here is your friend, you can roll out VMs fairly quickly and dispose of them leaving little to no mess afterwards.
The following Vagrantfile is for VirtualBox and will create a volume replicated across two nodes. My main aim of creating this Vagrantfile is to experience how Gluster behaves when taking servers offline, adding more servers and what happens when you replace/add bricks to a volume.
Below is the diagram (source) that describes what we are creating as our base replicated volume in Vagrant/Virtualbox:
Once you have run “vagrant up”, the above will be represented on the host filesystem as two .vdi images. When you add files to your mounted volume you can start to see how data starts to replicate between volumes and how the volume repairs when bringing up a server back online.
Hope this helps somebody, feel free to go nuts.