GlusterFS is a scalable, distributed filesystem used to manage storage across multiple servers. It enables the creation of a Trusted Storage Pool, a collection of nodes that work together as a single storage entity. Each server in the pool must have GlusterFS installed and properly configured to ensure smooth communication and functionality within the cluster.

Before adding servers to the Trusted Storage Pool, network configuration is essential. Each server must be assigned a static DNS entry to allow consistent and reliable communication. This network setup ensures that nodes recognize each other and are ready for integration into the pool. Proper network connectivity must be confirmed between all servers to guarantee that they can communicate seamlessly.

After setting up the network, each server is added to the Trusted Storage Pool using the gluster command-line tool. This creates a cluster that allows the storage resources from each server to be pooled together. Once the cluster is formed, its status can be checked and monitored from any node within the system to ensure all servers are properly connected.

Steps to set up a trusted storage pool for GlusterFS:

  1. Launch terminal.
  2. Open the /etc/hosts file on all nodes.
    $ sudo vi /etc/hosts
    [sudo] password for user:
  3. Add static DNS name and alias for all cluster nodes.
    #IP               Name                   Alias
    192.168.111.70    node1.gluster.local    node1
    192.168.111.71    node2.gluster.local    node2
  4. Ping each node from all nodes to confirm connectivity.
    $ 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
  5. Create the Trusted Pool by adding each node to the cluster.
    $ sudo gluster peer probe node2
    peer probe: success.
  6. Check the status of the peers from any node.
    $ sudo gluster peer status
    Number of Peers: 1
    
    Hostname: node2
    Uuid: 6770f88c-9ec5-4cf8-b9f5-658fa17b6bdc
    State: Peer in Cluster (Connected)
  7. Verify the Trusted Pool status from any node.
    $ sudo gluster pool list
    UUID					Hostname 	State
    6770f88c-9ec5-4cf8-b9f5-658fa17b6bdc	node2    	Connected 
    bca7490b-64c2-46d1-ae9a-4577cc03625f	localhost	Connected
Discuss the article:

Comment anonymously. Login not required.