{"id":15690344,"url":"https://github.com/halkyon/glusterfs-vagrant","last_synced_at":"2026-05-17T09:36:14.634Z","repository":{"id":139896993,"uuid":"342055731","full_name":"halkyon/glusterfs-vagrant","owner":"halkyon","description":"Vagrant and VirtualBox virtual environment for testing GlusterFS","archived":false,"fork":false,"pushed_at":"2021-02-26T04:06:09.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T02:28:29.340Z","etag":null,"topics":["gluster","glusterfs","storage","vagrant","virtualbox"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/halkyon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-24T22:41:28.000Z","updated_at":"2021-02-26T04:06:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"780a1bc9-8a99-44ce-9570-a3fa212f4cff","html_url":"https://github.com/halkyon/glusterfs-vagrant","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halkyon%2Fglusterfs-vagrant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halkyon%2Fglusterfs-vagrant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halkyon%2Fglusterfs-vagrant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halkyon%2Fglusterfs-vagrant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halkyon","download_url":"https://codeload.github.com/halkyon/glusterfs-vagrant/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314149,"owners_count":20757463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gluster","glusterfs","storage","vagrant","virtualbox"],"created_at":"2024-10-03T18:08:47.903Z","updated_at":"2025-10-26T16:32:12.565Z","avatar_url":"https://github.com/halkyon.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GlusterFS test Vagrant environment\n\nA Vagrant and VirtualBox virtual machine environment to test a GlusterFS storage cluster.\nUseful for playing around with GlusterFS in a sandbox.\n\nVagrant provisioning creates Ubuntu 20.04 servers, installs GlusterFS 9, and partitions XFS disks ready for use by GlusterFS.\nCreation of volume and setting up a mount on a test client is a manual step after servers are ready.\n\nFeatures:\n\n* Replica 3 setup, for high availability and to avoid split-brain.\n* Separate disks for storage data.\n* Servers communicate with eachother using the VirtualBox internal network.\n\nServers:\n\n* `dev-gluster-{01,02,03}` for the storage cluster itself.\n* `dev-client-01` for testing GlusterFS mount.\n\n## Usage\n\nAssuming Vagrant and VirtualBox are already installed:\n\n```\nvagrant up\n```\n\nSet up the storage cluster:\n\n```\nvagrant ssh dev-gluster-01\nsudo -i\ngluster peer probe 192.168.10.20\ngluster peer probe 192.168.10.30\ngluster volume create gv0 replica 3 192.168.10.{10,20,30}:/mnt/data/gv0\ngluster volume start gv0\n```\n\n`gv0` is now ready to be mounted!\n\nSet up a test client to mount the volume:\n\n```\nvagrant ssh dev-client-01\nsudo -i\nmkdir -p /mnt/gv0\necho \"192.168.10.10:/gv0 /mnt/gv0 glusterfs defaults,_netdev,backup-volfile-servers=192.168.10.20:192.168.10.30 0 0\" \u003e\u003e /etc/fstab\nmount /mnt/gv0\n```\n\n`/mnt/gv0` is now ready to be used!\n\n## Resizing volume\n\nIncrease the `data` disk sizes in `Vagrantfile` to whatever you want, then:\n\n```\nvagrant reload dev-gluster-01 dev-gluster-02 dev-gluster-03\nvagrant ssh dev-gluster-01 -c 'xfs_growfs /mnt/data'\nvagrant ssh dev-gluster-02 -c 'xfs_growfs /mnt/data'\nvagrant ssh dev-gluster-03 -c 'xfs_growfs /mnt/data'\n```\n\n## Performance testing/tuning\n\nFor testing, I use the [`smallfile`](https://github.com/distributed-system-analysis/smallfile) benchmark tool.\nAlthough your storage use case will vary, e.g. size of files you'll be storing on the cluster, so you may wish to use another benchmark like fio.\n\nThese options may improve small file performance:\n\n```\ngluster volume set gv0 group metadata-cache\ngluster volume set gv0 performance.qr-cache-timeout 600\ngluster volume set gv0 performance.readdir-ahead on\ngluster volume set gv0 performance.parallel-readdir on\n```\n\nNOTE: I tried `nl-cache`, but found file/dir not found errors during benchmarking, so I left those off. In any\ncase, it's always a good idea to test after enabling options!\n\n\nYou can also have clients use more threads, which you'll want to adjust according to `glusterfs` processes with `netstat -ntp | grep glusterfs` on clients:\n\n```\ngluster volume set gv0 client.event-threads 4\n```\n\n...and use a bigger cache on clients than the default 32MB, which you'll want to adjust according to memory available:\n\n```\ngluster volume set gv0 cache-size 512MB\n```\n\nReferences:\n\n* [Gluster performance tuning docs](https://docs.gluster.org/en/latest/Administrator-Guide/Performance-Tuning/).\n* [Small File Performance Enhancements docs)](https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.1/html/administration_guide/small_file_performance_enhancements).\n* [Performance testing docs](https://docs.gluster.org/en/latest/Administrator-Guide/Performance-Testing/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalkyon%2Fglusterfs-vagrant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalkyon%2Fglusterfs-vagrant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalkyon%2Fglusterfs-vagrant/lists"}