Installation and usage is simplified with the new release of glusterfs-tools, refer this blog for more details.
From GlusterFS website
GlusterFS is an open source, distributed file system capable of scaling to several petabytes (actually, 72 brontobytes!) and handling thousands of clients. GlusterFS clusters together storage building blocks over Infiniband RDMA or TCP/IP interconnect, aggregating disk and memory resources and managing data in a single global namespace. GlusterFS is based on a stackable user space design and can deliver exceptional performance for diverse workloads.
Gluster CLI has limited features to view and filter the volume info. I started a small project to enhance Gluster CLI for personal use. As of now it consists of a tool to list Gluster volumes in tabular format. Other intersesting features includes filtering the output based on name, type, status, bricks etc.
Clone the project(I cloned it to
cd /home/aravinda/sandbox git clone https://github.com/aravindavk/glusterfs-tools.git
Create a shellscript to call gftools /usr/local/bin/gfvolumes
#!/bin/bash python /home/aravinda/sandbox/glusterfs-tools/gftools/volumes.py "$@"
Make gfvolumes executable
chmod +x /usr/local/bin/gfvolumes
Now we can run
sudo gfvolumes to see the list of glusterfs volumes. Type
gfvolumes --help for help.
Additionally it can output filtered details in JSON format.
We can easily import this in our python script.
#!/usr/bin/python from gftools import volumes gfvols = volumes.GfVolumes() ok, vols = gfvols.get(name='^gv[0-9]$', status='down') # Various filters available if ok: # Do action
Note: root permission is required to run gluster command, so run gfvolumes as root(
- Adding more filters
- Adding more admin tools
- Creating RPM/DEB packages
C & S Welcome.