8.8. Configuring nfsexport and nfsserver Resources

This section describes the issues and considerations to take into account when configuring an nfsexport or an nfsserver resource.
The nfsexport resource agent works with NFSv2 and NFSv3 clients. When using nfsexport, you must do the following:
  • Ensure that nfs and nfslock are enabled at boot.
  • Add RPCNFSDARGS="-N 4" to the /etc/sysconfig/nfs file on all cluster nodes. The "-N 4" option prevents NFSv4 clients from being able to connect to the server.
  • Add STATDARG="-H /usr/sbin/clunfslock" to the /etc/sysconfig/nfs file on all cluster nodes.
  • Add nfslock="1" to the service component in the cluster.conf file.
  • Structure your service as follows:
    
       <service nfslock="1" ... >
         <fs name="myfs" ... >
           <nfsexport name="exports">
             <nfsclient ref="client1" />
             <nfsclient ref="client2" />
             ...
           </nfsexport>
         </fs>
         <ip address="10.1.1.2" />
         ...
       </service>
    
The nfsserver resource agent works with NFSv3 and NFSv4 clients. When using nfsserver, you must do the following:
  • Ensure that nfs and nfslock are disabled at boot
  • Ensure that nfslock="1" is not set for the service.
  • Structure your service as follows:
    
       <service ... >
            <fs name="myfs" ... >
              <nfsserver name="server">
                <nfsclient ref="client1" />
                <nfsclient ref="client2" />
                <ip address="10.1.1.2" />
                ...
              </nfsserver>
            </fs>
            ...
       </service>
    
When configuring a system to use the nfsserver resource agent for use with NFSv3 and NFSv4, you must account for the following limitations:
  • Configure only one nfsserver resource per cluster. If you require more, you must use restricted failover domains to ensure that the two services in question can never start on the same host.
  • Do not reference a globally-configured nfsserver resource in more than one service.
  • Do not mix old-style NFS services with the new nfsserver in the same cluster. Older NFS services required the NFS daemons to be running; nfsserver requires the daemons to be stopped when the service is started.
  • When using multiple file systems, you will be unable to use inheritance for the exports; thus reuse of nfsclient resources in services with multiple file systems is limited. You may, however, explicitly define target and path attributes for as many nfsclients as you like.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.