Linx下nfs1带多配置.docVIP

  • 4
  • 0
  • 约1.25万字
  • 约 8页
  • 2017-06-13 发布于河南
  • 举报
Linx下nfs1带多配置

有三台主机:皆安装RedHat 系统(版本:Red Hat 4.1.2-14)) NFS Server:04 NFS Client1:02 NFS Client2:06 NFS Server配置: 1、 检查nfs服务状态 [root@localhost ~]# service nfs status rpc.mountd is stopped nfsd is stopped rpc.rquotad is stopped 2、 [root@localhost ~]# cat /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=yes HOSTNAME=localhost.localdomain GATEWAY= 修改HOSTNAME= ,后保存 .在server的/etc/rc.sysinit中加入如下三 行 /sbin/portmap /usr/sbin/rpc.mountd /usr/sbin/rpc.nfsd 3、 [root@localhost ~]# vi /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 03 nfs-client.t1 02 nfs-client.t2 4、创建共享文件夹,并赋予权限; [root@localhost ~]# mkdir /data [root@localhost ~]# mkdir /data/doc [root@localhost ~]# chown nfsnobody:nfsnobody /data/doc [root@localhost ~]# chown -R nfsnobody:nfsnobody /data/doc/. 5、 [root@localhost ~]# vi /etc/exports /data/doc /24(rw,no_root_squash,no_all_squash,sync) 注意:此处ip段不用用192.168.8.*,如果使用192.168.8.*,则第一个客户端可以正常连接,但第二个客户端怎么都连接不上, 第二个客户端连接报错如下:showmount正常,但mount报错 [root@nfs-client ~]# showmount -e 04 Export list for 04: /data/doc 192.168.8.* [root@nfs-client ~]# mount -t nfs 04:/data/doc /data/doc mount: 04:/data/doc failed, reason given by server: Permission denied ##检查nfs服务器/var/log/messages发现有下面的错误信息 Aug 10 18:54:52 nfs-server kernel: NFSD: starting 90-second grace period Aug 10 18:55:36 nfs-server mountd[9272]: mount request from unknown host 02 for /data/doc (/data/doc) Aug 10 18:56:23 nfs-server mountd[9272]: mount request from unknown host 02 for /data/doc (/data/doc) Aug 10 19:01:34 nfs-server mountd[9272]: mount request from unknown host 02 for /data/doc (/data/doc) 上网查询,可能是nfs服务器/etc/exports中用192.168.8.*的问题,改成/24,问题解决 6、 [root@localhost ~]# chkconfig --list portmap portmap 0:off 1:off 2:off 3:on 4:on 5:on 6:off [root@localhost ~]# chkconfig --list nfs nfs 0:off 1:off 2:off

文档评论(0)

1亿VIP精品文档

相关文档