You can access gluster volumes in multiple ways. You can use Gluster Native Client method for high concurrency, performance and transparent failover in GNU/Linux clients. You can also use NFS v3 or CIFS to access gluster volumes GNU/Linux clients or Windows Clients.
The Gluster Native Client is a FUSE-based client running in user space. Gluster Native Client is the recommended method for accessing volumes when high concurrency and high write performance is required.
In this article, we’ll show you how to install GlusterFS native client on Ubuntu 16.04 or CentOS 7 / RHEL 7 and then how to mount glusterfs volume. If you didn’t yet install a Glusterfs Server you can check those article:
- How to Install and Setup GlusterFS Server on Centos 7 / RHEL 7 and Ubuntu 16.04 LTS
- How To Create A Striped GlusterFS Volumes
- How To Create A Distributed GlusterFS Volumes
- How to Create a Replicated GlusterFS Volumes
Step 1./ Adding GlusterFS Repository
– On RHEL
# vi /etc/yum.repos.d/glusterfs.repo [gluster3.10] name = Gluster 3.10 baseurl = http://mirror.centos.org/centos/$releasever/storage/$basearch/gluster-3.10/ gpgcheck = 0 enabled = 1
– On CentOS
# yum install epel-release # Install EPEL Repository to resolve all dependencies # yum search centos-release-gluster # yum install centos-release-gluster310 -y
– On Ubuntu
# sudo add-apt-repository ppa:gluster/glusterfs-3.10 # sudo apt-get update
Step 2./ Installing GlusterFS
– Install GlusterFS client package using one of the following commands:
# yum install -y glusterfs-client # Centos / RHEL # sudo apt-get install -y glusterfs-client # Ubuntu
Step 3./ Mounting GlusterFS Volume
– Create a directory on the client machine where you would want to mount the GlusterFS volume. In our case, we used /data.
sudo mkdir /data
Manually Mounting Volumes
– Mount the GlusterFS volume over /data directory. You will need to provide hostname of one of the GlusterFS servers. For demonstration, we are using glusterfs01.yallalabs.local. Please change it with your GlusterFS server’s hostname. Similarly replace volume_name in the command below by your GlusterFS volume name.
sudo mount -t glusterfs glusterfs01.yallalabs.local:/volume_name /data
Automatically Mounting Volumes
– You can configure your system to automatically mount the Gluster volume each time your system starts by editing the /etc/fstab file and adding the following line
# vi /etc/fstab ... server_name:/volume_name /data glusterfs defaults,_netdev 0 0
– Run the following command to mount the Glusterfs volume.
# mount -a
– Make sure that GlusterFS volume has been mounted using the following command.
# df -Th
We hope this tutorial was enough Helpful. If you need more information, or have any questions, just comment below and we will be glad to assist you!
PS. If you like this post please share it with your friends on the social networks using the buttons below.Thanks.