Being a distributed filesystem, Gluster requires multiple servers to work. A Gluster filesystem is first achieved by creating a cluster of servers called Trusted Server Pool.
These servers need to have GlusterFS server package installed and configured before joining together. You can configure the Trusted Server Pool for GlusterFS from the terminal using the gluster tool.
$ sudo vi /etc/hosts [sudo] password for user:
#IP Name Alias 192.168.111.70 node1.gluster.local node1 192.168.111.71 node2.gluster.local node2
$ ping -c3 node1 PING node1.gluster.local (192.168.111.70) 56(84) bytes of data. 64 bytes from node1.gluster.local (192.168.111.70): icmp_seq=1 ttl=64 time=0.018 ms 64 bytes from node1.gluster.local (192.168.111.70): icmp_seq=2 ttl=64 time=0.020 ms 64 bytes from node1.gluster.local (192.168.111.70): icmp_seq=3 ttl=64 time=0.035 ms --- node1.gluster.local ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2029ms rtt min/avg/max/mdev = 0.018/0.024/0.035/0.007 ms $ ping -c3 node2.gluster.local PING node2.gluster.local (192.168.111.71) 56(84) bytes of data. 64 bytes from node2.gluster.local (192.168.111.71): icmp_seq=1 ttl=64 time=1.72 ms 64 bytes from node2.gluster.local (192.168.111.71): icmp_seq=2 ttl=64 time=0.626 ms 64 bytes from node2.gluster.local (192.168.111.71): icmp_seq=3 ttl=64 time=0.410 ms --- node2.gluster.local ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2015ms rtt min/avg/max/mdev = 0.410/0.919/1.722/0.574 ms
$ sudo gluster peer probe node2 peer probe: success.
$ sudo gluster peer status Number of Peers: 1 Hostname: node2 Uuid: 6770f88c-9ec5-4cf8-b9f5-658fa17b6bdc State: Peer in Cluster (Connected)
$ sudo gluster pool list UUID Hostname State 6770f88c-9ec5-4cf8-b9f5-658fa17b6bdc node2 Connected bca7490b-64c2-46d1-ae9a-4577cc03625f localhost Connected
Comment anonymously. Login not required.