Este conteúdo não está disponível no idioma selecionado.

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
    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
    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
  • To enable NFS to start at boot, use the following command:
    # systemctl enable nfs
  • To stop the server, use:
    # systemctl stop nfs
  • 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
  • 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
  • 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
  • To reload the NFS server configuration file without restarting the service type:
    # systemctl reload nfs
Red Hat logoGithubRedditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja oBlog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

© 2024 Red Hat, Inc.