GlustFS

commands

sudo yum install centos-release-gluster312.noarch
sudo yum install glusterfs gluster-cli glusterfs-libs glusterfs-server
sudo mkdir /home/glusterfs
sudo chown <user>:<user group> /home/glusterfs
gluster peer probe swarm-manager01.yourdomain.com
sudo gluster peer probe swarm-manager01.yourdomain.com
sudo service enable gluster.service
sudo systemctl enable gluster.service
sudo systemctl enable glusterd.service
sudo systemctl start glusterd
sudo systemctl status glusterd
sudo systemctl enable glusterd.service
sudo systemctl start glusterd.service
sudo gluster peer probe swarm-manager02.yourdomain.com
sudo gluster peer probe swarm-manager03.yourdomain.com
sudo gluster peer probe swarm-manager01.yourdomain.com
sudo gluster peer probe swarm-node01.yourdomain.com
sudo gluster peer probe swarm-node02.yourdomain.com
sudo gluster peer probe swarm-worker02.yourdomain.com
sudo gluster peer probe swarm-worker01.yourdomain.com
sudo gluster peer status
gluster volume create gfs replica 3 swarm-manager01.yourdomain.com:/home/glusterfs swarm-manager02.yourdomain.com:/home/glusterfs swarm-worker01.yourdomain.com:/home/glusterfs gluster volume create gfs replica 5 swarm-manager01.yourdomain.com:/home/glusterfs swarm-manager02.yourdomain.com:/home/glusterfs swarm-worker01.yourdomain.com:/home/glusterfs \
sudo gluster volume create gfs replica 5 swarm-manager01.yourdomain.com:/home/glusterfs swarm-manager02.yourdomain.com:/home/glusterfs swarm-worker01.yourdomain.com:/home/glusterfs swarm-worker02.yourdomain.com:/home/glusterfs
sudo gluster volume create gfs replica 3 swarm-manager01.yourdomain.com:/home/glusterfs swarm-manager02.yourdomain.com:/home/glusterfs swarm-worker01.yourdomain.com:/home/glusterfs swarm-worker02.yourdomain.com:/home/glusterfs
sudo gluster volume create gfs replica 5 swarm-manager03.yourdomain.com/home/glusterfs swarm-manager01.yourdomain.com:/home/glusterfs swarm-manager02.yourdomain.com:/home/glusterfs swarm-worker01.yourdomain.com:/home/glusterfs swarm-worker02.yourdomain.com:/home/glusterfs
mkdir -p /home/glusterfs/1/brick
sudo gluster volume create gfs replica 5 swarm-manager03.yourdomain.com/home/glusterfs/1/brick swarm-manager01.yourdomain.com:/home/glusterfs/3/brick swarm-manager02.yourdomain.com:/home/glusterfs/2/brick swarm-worker01.yourdomain.com:/home/glusterfs/4/brick swarm-worker02.yourdomain.com:/home/glusterfs/brick
sudo gluster volume create gfs replica 5 swarm-manager03.yourdomain.com:/home/glusterfs/1/brick swarm-manager01.yourdomain.com:/home/glusterfs/3/brick swarm-manager02.yourdomain.com:/home/glusterfs/2/brick swarm-worker01.yourdomain.com:/home/glusterfs/4/brick swarm-worker02.yourdomain.com:/home/glusterfs/brick
sudo gluster volume create gfs replica 5 swarm-manager03.yourdomain.com:/home/glusterfs/1/brick swarm-manager01.yourdomain.com:/home/glusterfs/3/brick swarm-manager02.yourdomain.com:/home/glusterfs/2/brick swarm-worker01.yourdomain.com:/home/glusterfs/4/brick swarm-worker02.yourdomain.com:/home/glusterfs/brick
sudo gluster volume create gfs replica 5 swarm-manager03.yourdomain.com:/home/glusterfs/1/brick swarm-manager01.yourdomain.com:/home/glusterfs/3/brick swarm-manager02.yourdomain.com:/home/glusterfs/2/brick swarm-worker01.yourdomain.com:/home/glusterfs/4/brick swarm-worker02.yourdomain.com:/home/glusterfs/brick force
sudo gluster list
sudo gluster volume list
sudo gluster start gfs
sudo gluster volume start gfs
sudo gluster volume status gfs
sudo yum install glusterfs-server
yum search centos-release-gluster
sudo yum install centos-release-gluster312.noarch
sudo yum install glusterfs gluster-cli glusterfs-libs glusterfs-server
sudo mkdir /home/glusterfs
sudo chown <user>:<user> /home/glusterfs
sudo systemctl enable glusterd.service
sudo systemctl start glusterd.service
mkdir -p /home/glusterfs/3/brick
cd /home/glusterfs/3/brick
sudo gluster volume info gfs
sudo gluster volume status gfs
sudo mount.glusterfs localhost:gfs /mnt
cd /mnt
cd /home/glusterfs/3/brick/
cd /mnt
sudo mkdir projects
sudo chmod 775 projects/
sudo chown <user>:<user group> projects/
cd projects/
echo "my test" >first.txt
sudo umount /mnt
sudo vi /etc/fstab
sudo mkdir /storage
cd /storage/
sudo mount -a

/etc/fstab

localhost:/gfs /storage glusterfs defaults,_netdev,backupvolfile-server=localhost 0 0

https://sysadmins.co.za/setup-a-3-node-replicated-storage-volume-with-glusterfs/

Written on May 3, 2018