The software described in this documentation is either no longer supported or is in extended support.
Oracle recommends that you upgrade to a current supported release.
Access to Gluster volumes is provided through a number of different network file system technologies including NFS, Samba and a Gluster native client that uses the File System in Userspace (FUSE) software interface to provide access to the volume.
If you need to mount the Gluster volume locally on one of the nodes, you should treat this as an additional mount exactly as if you were mounting from a remote host.
Editing the data within the volume directly on the file system on each node can quickly lead to split-brain scenarios and potential file system corruption.
You can expose volumes using NFS-Ganesha. NFS-Ganesha is a user space file server for the NFS protocol. It provides a FUSE-compatible File System Abstraction Layer (FSAL) to allow access from any NFS client.
To access a volume using NFS:
On each node in the trusted storage pool on which you want to enable NFS access:
Install the Gluster NFS-Ganesha client packages:
#
yum install nfs-ganesha-gluster
Create an export configuration file in the
/etc/ganesha/exports
directory. This file contains the NFS export information for NFS Ganesha. In this example we use the file nameexport.myvolume.conf
to export a volume namedmyvolume
to an NFS share located at/myvolume
on the node.EXPORT{ Export_Id = 1 ; # Export ID unique to each export Path = "/
myvolume
"; # Path of the volume to be exported. Eg: "/test_volume" FSAL { name = GLUSTER; hostname = "localhost"; # IP of one of the nodes in the trusted pool volume = "myvolume
"; # Volume name. Eg: "test_volume" } Access_type = RW; # Access permissions Squash = No_root_squash; # To enable/disable root squashing Disable_ACL = TRUE; # To enable/disable ACL Pseudo = "/myvolume
"; # NFSv4 pseudo path for this export. Eg: "/test_volume_pseudo" Protocols = "3","4" ; # NFS protocols supported Transports = "UDP","TCP" ; # Transport protocols supported SecType = "sys"; # Security flavors supported }Edit the
/etc/ganesha/ganesha.conf
file to include the new export configuration file, for example:... %include "/etc/ganesha/exports/
export.myvolume.conf
"Enable and start the
nfs-ganesha
service:#
systemctl enable --now nfs-ganesha
NoteIf the volume is created after you set up access using NFS, you must reload the
nfs-ganesha
service:#
systemctl reload-or-restart nfs-ganesha
Check the volume is exported:
#
showmount -e localhost
Export list for localhost: /myvolume (everyone)To connect to the volume from an NFS client, mount the NFS share, for example:
#
mkdir /
#gluster-storage
mount
node1:/myvolume
/gluster-storage
Any files created in this
/gluster-storage
directory on the NFS client are written to the Gluster volume.