GlusterFS 11 : GlusterFS + NFS-Ganesha2024/11/01 |
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. |
|
[1] | If NFS server is running, stop and disable it. |
[root@node01 ~]# systemctl disable --now nfs-server |
[2] | Install and Configure NFS-Ganesha on a Node in GlusterFS Cluster. |
[root@node01 ~]#
[root@node01 ~]# dnf -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 mount [root@node01 ~]# showmount -e localhost Export list for localhost: /vfs_distributed (everyone) |
[3] | If Firewalld is running, allow NFS service. |
[root@node01 ~]# firewall-cmd --add-service=nfs success [root@node01 ~]# firewall-cmd --runtime-to-permanent success |
[4] | 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 /dev/mapper/fedora-root xfs 15G 2.0G 14G 13% / devtmpfs devtmpfs 4.0M 0 4.0M 0% /dev tmpfs tmpfs 2.0G 0 2.0G 0% /dev/shm tmpfs tmpfs 782M 1.1M 781M 1% /run tmpfs tmpfs 1.0M 0 1.0M 0% /run/credentials/systemd-journald.service tmpfs tmpfs 1.0M 0 1.0M 0% /run/credentials/systemd-network-generator.service tmpfs tmpfs 1.0M 0 1.0M 0% /run/credentials/systemd-udev-load-credentials.service tmpfs tmpfs 1.0M 0 1.0M 0% /run/credentials/systemd-sysctl.service tmpfs tmpfs 1.0M 0 1.0M 0% /run/credentials/systemd-tmpfiles-setup-dev-early.service tmpfs tmpfs 1.0M 0 1.0M 0% /run/credentials/systemd-tmpfiles-setup-dev.service tmpfs tmpfs 1.0M 0 1.0M 0% /run/credentials/systemd-vconsole-setup.service tmpfs tmpfs 2.0G 0 2.0G 0% /tmp /dev/vda2 xfs 960M 316M 645M 33% /boot tmpfs tmpfs 1.0M 0 1.0M 0% /run/credentials/systemd-tmpfiles-setup.service tmpfs tmpfs 1.0M 0 1.0M 0% /run/credentials/systemd-resolved.service tmpfs tmpfs 1.0M 0 1.0M 0% /run/credentials/getty@tty1.service tmpfs tmpfs 1.0M 0 1.0M 0% /run/credentials/serial-getty@ttyS0.service tmpfs tmpfs 391M 4.0K 391M 1% /run/user/0 node01.srv.world:/vfs_distributed nfs4 30G 4.2G 26G 15% /mnt # verify reading and writing [root@client ~]# echo "Gluster NFS write test" > /mnt/testfile.txt [root@client ~]# cat /mnt/testfile.txt Gluster NFS write test |
Sponsored Link |
|