在 Oracle® Solaris 11.2 中管理网络文件系统

退出打印视图

更新时间: 2014 年 7 月
 
 

如何远程检查 NFS 服务器

请注意,如果使用的是 NFS 版本 4 服务器,则不必同时支持 UDP 和 MOUNT 协议。

  1. 检查是否已在 NFS 服务器上启动 NFS 守护进程。
    # rpcinfo -s server-name|egrep 'nfs|mountd'

    例如:

    # rpcinfo -s bee|egrep 'nfs|mountd'
     100003  3,2    tcp,udp,tcp6,upd6                nfs     superuser
     100005  3,2,1  ticots,ticotsord,tcp,tcp6,ticlts,udp,upd6  mountd  superuser

    如果尚未启动守护进程,请重新启动 NFS 服务。有关更多信息,请参见如何重新启动 NFS 服务

  2. 在客户机上,测试来自服务器的 UDP NFS 连接。
    # /usr/bin/rpcinfo -u bee nfs
    program 100003 Version 2 ready and waiting
    program 100003 Version 3 ready and waiting

    注 -  NFS 版本 4 不支持 UDP。

    如果服务器正在运行,rpcinfo 命令将列出与 UDP 协议关联的程序和版本号。您可以使用带有 –t 选项的 rpcinfo 命令来检查 TCP 连接。如果 rpcinfo 命令失败,请检查是否在服务器上启用了 NFS 服务。有关更多信息,请参见如何验证服务器上的 NFS 服务

  3. 检查服务器的 mountd 守护进程是否正在响应。
    # /usr/bin/rpcinfo -u bee mountd
    program 100005 Version 1 ready and waiting
    program 100005 Version 2 ready and waiting
    program 100005 Version 3 ready and waiting

    如果服务器正在运行,rpcinfo 命令将列出与 UDP 协议关联的程序和版本号。使用 –t 选项可以测试 TCP 连接。检查 nfsdmountd 守护进程是否正在运行。

  4. 通过改为正常工作的 /net/home 挂载点,检查本地 autofs 服务是否由客户机使用。
    # cd /net/eng

    如果该命令失败,则在客户机上以 root 用户身份重新启动 autofs 服务。

    # svcadm restart system/filesystem/autofs
  5. 验证是否在服务器上按照预期方式共享文件系统。
    # /usr/sbin/showmount -e bee
    /usr/src										eng
    /export/share/man						(everyone)

    请检查服务器上的项和本地挂载项中是否有错误。另外,还要检查名称空间。在该示例中,如果第一台客户机不在 eng 网络组中,则该客户机不能挂载 /usr/src 文件系统。

    请检查所有本地文件中所有包括挂载信息的项。该列表包括 /etc/vfstab 文件和所有 /etc/auto_* 文件。