GlusterFS is a distributed file system that allows several servers to be used as a single network drive. A Gluster volume is made up from 'bricks' of data stored on several different servers. Bricks can be replicated on different servers for redundancy. |
I've built a Banana Pi cluster with stack of four hard SATA disks.
Each disk has 1TB capacity, with one GlusterFS brick on each disk. Two of the bricks are redundant copies, so the available storage on the cluster is 2TB rather than 4.
On each server node, you need to install GlusterFS server:
On one of the nodes, use the gluster peer probe command to connect to the other peers: Copy the Code
- sudo apt-get install glusterfs-server
The host names of nodes in the cluster are glus1, glus2, glus3 and glus4. Create the volume: Copy the Code
- sudo gluster peer probe glus2
- sudo gluster peer probe glus3
- sudo gluster peer probe glus4
Start the volume: Copy the Code
- sudo gluster volume create vol0 replica 2 glus1:/srv/store/vol0 glus2:/srv/store/vol0 glus3:/srv/store/vol0 glus4:/srv/store/vol0
- Creation of volume vol0 has been successful. Please start the volume to access data.
So far I've only accessed the volume from one client at a time. I installed the GlusterFS client as follows: Copy the Code
- sudo gluster volume start vol0
And mount the volume: Copy the Code
- sudo apt-get install glusterfs-client
You can read about it in detail here: http://banoffeepiserver.com/glusterfs/. Copy the Code
- sudo mount -t glusterfs glus1:/vol0 /mnt