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>
    
    Copy to Clipboard Toggle word wrap
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>
    
    Copy to Clipboard Toggle word wrap
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.
Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2025 Red Hat