Skip to main content
Version: 3026.10 / 3026.11-mp

Mount a Fusion NFS Export from a Linux Client

This guide shows how to mount a Fusion NFS export from a Linux client, using AUTH_NONE, AUTH_SYS or Kerberos authentication, over TCP or RDMA.

Use a Linux client for NFSv4.1

A Windows client supports only NFSv3 and SMB, so it cannot be used for NFSv4.1 (or multiprotocol NFSv4.1 + SMB). Use a Linux client for the steps below.

Prerequisites​

  • The server has the NFS service enabled:

    • An ONCRPC_TCP listener on port 2049, for example listen = ANY,0.0.0.0,IPv4,2049,ONCRPC_TCP.
    • To mount over RDMA instead, an ONCRPC_RDMA listener on port 20049, for example
      listen = ANY,0.0.0.0,RDMA_IPv4,20049,ONCRPC_RDMA.
  • The client has the standard NFS tooling installed:

    # Debian/Ubuntu
    sudo apt install nfs-common
    # RHEL/Rocky
    sudo dnf install nfs-utils

Mount with AUTH_SYS​

If you do not specify sec=, the client uses AUTH_SYS. The client sends the UID and GIDs of the user, and the server trusts these IDs.

AUTH_SYS is not recommended

With AUTH_SYS, the server trusts the UID and GIDs that the client sends. Any client can send any identity. Use Kerberos instead. To refuse AUTH_SYS on a share, remove sys from its nfs_auth_flavors list.

In the example below, server.example.com is the host name of the server and sh1 is the export name of the share.

sudo mount -t nfs4 -o vers=4.1 server.example.com:/sh1 /mnt/nfs

Make sure that the mount uses NFS 4.1 and AUTH_SYS:

nfsstat -m # shows vers=4.1, sec=sys

Mount with AUTH_NONE​

With AUTH_NONE, the client does not send an identity. The server gives each request the anonymous identity configured using nfs_squash_id. The default is 65534:65534.

sudo mount -t nfs4 -o vers=4.1,sec=none server.example.com:/sh1 /mnt/nfs

Mount with Kerberos​

Kerberos authenticates the user cryptographically and supports integrity (krb5i) and privacy (krb5p) in addition to authentication (krb5).

  1. Server — Join the server to Active Directory. See Join Active Directory. Then add the nfs service principal name to the computer account of the server, next to cifs. For more information, see Kerberos (RPCSEC_GSS).

    sudo adcli update --domain EXAMPLE.COM --service-name=cifs --service-name=nfs
  2. Client — Join the client to the same domain. Use the steps in Joining the Domain and Adding UPN with the host name of the client. Then get a ticket and mount the export with -o sec=krb5 (or krb5i / krb5p):

    sudo mount -t nfs4 -o vers=4.1,sec=krb5 server.example.com:/sh1 /mnt/nfs

Mount over RDMA​

Use NFS over RDMA on an RDMA-capable network (RoCEv2 or InfiniBand).

Load the RDMA transport module on the client:

sudo modprobe rpcrdma

Mount the export with proto=rdma and the port of the ONCRPC_RDMA listener:

sudo mount -t nfs4 -o vers=4.1,proto=rdma,port=20049 server.example.com:/sh1 /mnt/nfs

Make sure that the mount uses RDMA:

nfsstat -m # shows proto=rdma,port=20049

Multiple connections (trunking)​

The client can use more than one TCP connection for the same mount. More connections can increase throughput. Set the number of connections with the nconnect option. The Linux client accepts values from 1 to 16:

sudo mount -t nfs4 -o vers=4.1,nconnect=8 server.example.com:/sh1 /mnt/nfs

Troubleshooting​

SymptomThings to check
mount.nfs4: ... No such file or directoryThe export name in the mount command is wrong, or the share is not exported over NFS. Check nfs_export_name or netname of the share.
mount.nfs4: access denied, or permission errors on filesThe share allows the security flavor of the mount (nfs_auth_flavors). The POSIX permissions of the files allow the UID and GIDs of the user. By default, nfs_squash = root gives root on the client the anonymous identity from nfs_squash_id.
Kerberos mount fails (gss_init_sec_context, Permission denied)The user has a valid ticket (klist). The rpc-gssd service runs on the client. The mount command uses the FQDN of the server. The clocks of the hosts are in sync. The server keytab has the nfs/<fqdn> SPN.
RDMA mount fails or hangsThe rpcrdma module is loaded on the client. The server log shows no RDMA listener error. An RDMA listener must use ANY as its interface.