In order to serve files via NFS, configure a BeeGFS client host to be a NFS server and re-export the
BeeGFS client mount-point via NFS. On the NFS server system, set the following option in the
beegfs-client.conf to ensure that file attributes are also refreshed on the additional code
paths the NFS server:
tuneRefreshOnGetAttr = true
Example NFSv4 export for kernel NFS server in file
Example NFSv4 mount:
$ mount -t nfs -overs=4 myserver:/ /mnt/beegfs_via_nfs/
Before starting the kernel NFS server and mounting the NFS client, disable NFSv4 file leases to ensure that NFS does not keep files open after they have actually been closed by the application:
$ sysctl -w fs.leases-enable=0
To have NFSv4 file leases also persistently disabled after a server reboot, add the following line
fs.leases-enable = 0
Make sure to start the NFS server after the BeeGFS client. If you are using systemd, add this file
Then tell systenmd to reload the service files:
Kernel NFSv3 is not supported!
NFS clients exchange cookies with the servers for identifying files when they are no longer on the server cache. The maximum size of such cookies in NFSv3 is too small for encoding BeeGFS entry lookup information. In NFSv4, the maximum cookie size was raised, enabling BeeGFS to use NFS cookies. Although kernel NFSv3 exports might sometimes work in your system, eventually, they are very likely to fail as soon as cookies are used (i.e., when the NFS server starts dropping entries from its cache and the cookie information is needed for lookups). So, make sure that you use kernel NFS version 4.
It is a good idea to restrict the NFS protocol versions used in your system, as explained in the
section A4 of the NFS documentation. The best way to do that is to add the definition
RPCMOUNTDOPTS="--no-nfs-version 3" to the file
/etc/sysconfig/nfs, which is read by the
Beware that disabling NFSv3 in the server configuration and even restarting the NFS server machine may not be enough for enforcing NFSv4 in your network, because NFS stores allowed connections and sessions on disk. So, when the NFS server is restarted, the allowed connections are loaded from disk and thus, old NFS clients could still be allowed to reconnect via NFSv3. Only after all NFS clients are restarted, NFSv4 will really be used by all parts.