NFS 配置4

2022-07-09 23:27:18 浏览数 (1)

其中

  • rpcbind 在UDP TCP的111上
  • NFS在UDP TCP的2049上
  • 其它服务都是在UDP TCP的随机端口上进行监听(rpcbind知道在哪里)

那为什么是三个NFS 服务呢

代码语言:javascript复制
[root@test ~]# rpcinfo -u  localhost nfs 
program 100003 version 2 ready and waiting
program 100003 version 3 ready and waiting
program 100003 version 4 ready and waiting
[root@test ~]# rpcinfo -t  localhost nfs 
program 100003 version 2 ready and waiting
program 100003 version 3 ready and waiting
program 100003 version 4 ready and waiting
[root@test ~]# 

[root@abc ~]# rpcinfo -t test nfs 
program 100003 version 2 ready and waiting
program 100003 version 3 ready and waiting
program 100003 version 4 ready and waiting
[root@abc ~]# rpcinfo -u test nfs 
program 100003 version 2 ready and waiting
program 100003 version 3 ready and waiting
program 100003 version 4 ready and waiting
[root@abc ~]# 

因为为了更好的兼容,NFS开启了三个版本进行响应


查看NFS共享

使用 showmount 查看NFS共享

这个工具同样依赖rpcbind

代码语言:javascript复制
[root@nfs-server ~]# showmount  -a localhost
All mount points on localhost:
192.168.1.215:/data/nfs
[root@nfs-server ~]# showmount  -e localhost
Export list for localhost:
/data/nfs 192.168.1.0/24
[root@nfs-server ~]# cat /etc/exports 
/data/nfs     192.168.1.215(rw,sync,no_root_squash)  192.168.1.0/24(ro)
[root@nfs-server ~]# 

[root@nfs-client ~]# showmount -e nfs-server 
Export list for nfs-server:
/data/nfs 192.168.1.0/24
[root@nfs-client ~]# showmount -a nfs-server 
All mount points on nfs-server:
192.168.1.215:/data/nfs
[root@nfs-client ~]#
udp

0 人点赞