What is Gluster? Read the documentation it’s really easy to understand. At the end of the day, however, it’s a kind of NAS framework. It has a couple different patterns but nothing close to raid. The best part is that it’s simple.
In my case I had 3 servers in the cluster and this is the basic config.
# glusterfs server
sudo apt install glusterfs-server -y
sudo systemctl start glusterd.service
sudo systemctl enable glusterd.service
sudo systemctl status glusterd.service
# cat1
sudo ufw allow from 192.168.86.161 to any port 24007
sudo ufw allow from 192.168.86.169 to any port 24007
sudo ufw deny 24007
sudo gluster peer probe 192.168.86.161
sudo gluster peer probe 192.168.86.169
sudo gluster peer status
# cat2
sudo ufw allow from 192.168.86.87 to any port 24007
sudo ufw allow from 192.168.86.169 to any port 24007
sudo ufw deny 24007
sudo gluster peer probe 192.168.86.87
sudo gluster peer probe 192.168.86.169
sudo gluster peer status
# cat3
sudo ufw allow from 192.168.86.87 to any port 24007
sudo ufw allow from 192.168.86.161 to any port 24007
sudo ufw deny 24007
sudo gluster peer probe 192.168.86.87
sudo gluster peer probe 192.168.86.161
sudo gluster peer status
# resume (mirrored aka replicas)
sudo gluster volume create volume1 replica 3 cat1.example.com:/gluster-storage cat2.example.com:/gluster-storage cat3.example.com:/gluster-storage force
sudo gluster volume start volume1
sudo gluster volume status
# resume (dispersed)
mkdir /gluster-storage2/exp1
sudo gluster volume create volume2 disperse 3 cat{1..3}.example.com:/gluster-storage2/exp1
sudo gluster volume start volume2
sudo gluster volume status
# resume (striped)
sudo gluster volume create volume2 stripe cat{1..3}.example.com:/gluster-storage2 force
sudo gluster volume start volume2
sudo gluster volume status
# glusterfs client
# cat1
sudo ufw allow from gluster2_ip_address to any port ??
sudo ufw deny 49152
# cat2
sudo ufw allow from gluster2_ip_address to any port ??
sudo ufw deny 49152
# cat3
sudo ufw allow from gluster2_ip_address to any port ??
sudo ufw deny 49152
# common
sudo apt install glusterfs-client -y
sudo mkdir /state
sudo mount -t glusterfs cat1.example.com:volume1 /state
QED