CentOS8 配置NFS Server

376 阅读1分钟
  1. 检查nfs-server是否安装 rpm -qa |grep nfs-utils

  2. 检查服务是否启动 systemctl status nfs-server

  3. 检查端口 $ netstat -an |grep -i 2049 tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN tcp 0 0 10.23.142.124:2049 10.23.136.201:834 ESTABLISHED tcp6 0 0 :::2049

  4. 检查配置 cat /etc/exportfs

  5. 执行nfs mount point导出 exportfs -avr

  6. 检查mount输出路径是否 sudo exportfs -s showmount -e

  7. 检查防火墙服务 systemctl status firewalld

  8. 添加允许服务

    sudo firewall-cmd --permanent --add-service=nfs sudo firewall-cmd --permanent --add-service=rpc-bind sudo firewall-cmd --permanent --add-service=mountd sudo firewall-cmd --reload

  9. 打开关闭log输出 rpcdebug -m nfsd -c all

    Note:

rpcdebug is the command used to set NFS & RPC debug flags? This command supports below switch :

-m: specify modules to set or clear -s: set given debug flags -c: Clear flags Pretty simple! If you want to enable debugging use -s, if you want to turn off/disable debugging use -c! Below is a list of important debug flags you can set or clear.

nfs: NFS client nfsd: NFS server NLM : Network lock manager of client or server RPC : Remote procedure call module of client or server