Este contenido no está disponible en el idioma seleccionado.

8.5. Starting and Stopping the NFS Server


Prerequisites

  • For servers that support NFSv2 or NFSv3 connections, the rpcbind[1] service must be running. To verify that rpcbind is active, use the following command:
    $ systemctl status rpcbind
    Copy to Clipboard Toggle word wrap
    To configure an NFSv4-only server, which does not require rpcbind, see Section 8.6.7, “Configuring an NFSv4-only Server”.
  • On Red Hat Enterprise Linux 7.0, if your NFS server exports NFSv3 and is enabled to start at boot, you need to manually start and enable the nfs-lock service:
    # systemctl start nfs-lock
    # systemctl enable nfs-lock
    Copy to Clipboard Toggle word wrap
    On Red Hat Enterprise Linux 7.1 and later, nfs-lock starts automatically if needed, and an attempt to enable it manually fails.

Procedures

  • To start an NFS server, use the following command:
    # systemctl start nfs
    Copy to Clipboard Toggle word wrap
  • To enable NFS to start at boot, use the following command:
    # systemctl enable nfs
    Copy to Clipboard Toggle word wrap
  • To stop the server, use:
    # systemctl stop nfs
    Copy to Clipboard Toggle word wrap
  • The restart option is a shorthand way of stopping and then starting NFS. This is the most efficient way to make configuration changes take effect after editing the configuration file for NFS. To restart the server type:
    # systemctl restart nfs
    Copy to Clipboard Toggle word wrap
  • After you edit the /etc/sysconfig/nfs file, restart the nfs-config service by running the following command for the new values to take effect:
    # systemctl restart nfs-config
    Copy to Clipboard Toggle word wrap
  • The try-restart command only starts nfs if it is currently running. This command is the equivalent of condrestart (conditional restart) in Red Hat init scripts and is useful because it does not start the daemon if NFS is not running.
    To conditionally restart the server, type:
    # systemctl try-restart nfs
    Copy to Clipboard Toggle word wrap
  • To reload the NFS server configuration file without restarting the service type:
    # systemctl reload nfs
    Copy to Clipboard Toggle word wrap
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat