GlusterFS 11 : GlusterFS + NFS-Ganesha2023/03/31 |
Install NFS-Ganesha and integrate with GlusterFS to mount Gluster Volume with NFS protocol.
The supported NFS protocols by NFS-Ganesha are v3, v4.0, v4.1, pNFS.
For example, Configure NFS Export setting to a Gluster Volume [vol_distributed] like an example of the link here.
|
|
[1] | Install and Configure NFS-Ganesha on a Node in GlusterFS Cluster. |
[root@node01 ~]#
dnf -y install centos-release-nfs-ganesha4
[root@node01 ~]#
sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/CentOS-NFS-Ganesha-4.repo
[root@node01 ~]#
[root@node01 ~]# dnf --enablerepo=centos-nfs-ganesha-4 -y install nfs-ganesha-gluster mv /etc/ganesha/ganesha.conf /etc/ganesha/ganesha.conf.org
[root@node01 ~]#
vi /etc/ganesha/ganesha.conf # create new NFS_CORE_PARAM { # possible to mount with NFSv3 to NFSv4 Pseudo path mount_path_pseudo = true; # NFS protocol Protocols = 3,4; } EXPORT_DEFAULTS { # default access mode Access_Type = RW; } EXPORT { # unique ID Export_Id = 101; # mount path of Gluster Volume Path = "/vol_distributed"; FSAL { # any name name = GLUSTER; # hostname or IP address of this Node hostname="10.0.0.51"; # Gluster volume name volume="vol_distributed"; } # config for root Squash Squash="No_root_squash"; # NFSv4 Pseudo path Pseudo="/vfs_distributed"; # allowed security options SecType = "sys"; } LOG { # default log level Default_Log_Level = WARN; }
[root@node01 ~]#
systemctl enable --now nfs-ganesha
# verify Export list [root@node01 ~]# showmount -e localhost Export list for localhost: /vfs_distributed (everyone) |
[2] | If Firewalld is running, allow NFS service. |
[root@node01 ~]# firewall-cmd --add-service=nfs success [root@node01 ~]# firewall-cmd --runtime-to-permanent success |
[3] | Verify NFS mounting on a Client Host. |
[root@client ~]#
dnf -y install nfs-utils # specify Pseudo path set on [Pseudo=***] in ganesha.conf [root@client ~]# mount -t nfs4 node01.srv.world:/vfs_distributed /mnt [root@client ~]# df -hT Filesystem Type Size Used Avail Use% Mounted on devtmpfs devtmpfs 4.0M 0 4.0M 0% /dev tmpfs tmpfs 2.0G 0 2.0G 0% /dev/shm tmpfs tmpfs 784M 8.6M 775M 2% /run /dev/mapper/cs-root xfs 26G 2.3G 24G 9% / /dev/vda1 xfs 1014M 295M 720M 29% /boot tmpfs tmpfs 392M 0 392M 0% /run/user/0 node01.srv.world:/vfs_distributed nfs4 52G 4.8G 48G 10% /mnt |
Sponsored Link |