Steps to mount GlusterFS volume from Linux:

  1. Launch terminal session on server.
  2. List available GlusterFS volumes on the GlusterFS server.
    $ sudo gluster volume list
    [sudo] password for user:
    volume1 
  3. List host name of GlusterFS peers on the GlusterFS server.
    $ cat /etc/hosts
    192.168.111.70    node1.gluster.local    node1
    192.168.111.71    node2.gluster.local    node2
  4. Launch terminal session on client.
  5. Open /etc/host using your favorite text editor.
  6. Add static host.
    192.168.111.70    node1.gluster.local    node1
    192.168.111.71    node2.gluster.local    node2
  7. Install GlusterFS client application.
    $ sudo apt update && sudo apt install --assume-yes glusterfs-client # Ubuntu or Debian variant
    $ sudo apt update && sudo apt install --assume-yes glusterfs-client # Ubuntu or Debian variant
    $ sudo dnf install --assumeyes glusterfs-fuse # CentOS, Fedora or Red Hat variance
  8. Create mount point.
    $ sudo mkdir -p /mnt/volume1
  9. Mount manually using host name.
    $ sudo mount -t glusterfs node1:/volume1 /mnt/volume1/
  10. Test if mount is successful.
    $ df /mnt/volume1/
    Filesystem     1K-blocks    Used Available Use% Mounted on
    node1:/volume1  19991152 8207136  10945388  43% /mnt/volume1
  11. Unmount GlusterFS volume.
    $ sudo umount /mnt/volume1

  12. Open fstab using your preferred text editor.
    $ sudo vi /etc/fstab
  13. Add entry to mount GlusterFS volume.
    node1:/volume1  /mnt/volume1 glusterfs  defaults,_netdev        0 0
  14. Save and exit text editor.
  15. Mount GlusterFS volume via fstab entry.
    $ sudo mount /mnt/volume1/
  16. Test if GlusterFS volume is successfully mounted.
    $ df /mnt/volume1/
    Filesystem     1K-blocks    Used Available Use% Mounted on
    node1:/volume1  19991152 8207136  10945388  43% /mnt/volume1
  17. Reboot system and test if volume successfully mount after reboot.
    $ sudo reboot
Discuss the article:

Comment anonymously. Login not required.

Share!