我有三台机器正在生产-
machineA 10.66.136.129
machineB 10.66.138.181
machineC 10.66.138.183
所有这些机器都安装了Ubuntu 12.04,并且我具有对这三台机器的root访问权。
现在我应该在上面的机器中做下面的事情-
Create mount point /opt/exhibitor/conf
Mount the directory in all servers.
sudo mount <NFS-SERVER>:/opt/exhibitor/conf /opt/exhibitor/conf/
/opt/exhibitor/conf
如上所述,我已经在所有这三台计算机上创建了目录。
现在,我试图创建一个挂载点。所以我遵循以下过程-
在以上三台机器上安装NFS支持文件和NFS内核服务器
$ sudo apt-get install nfs-common nfs-kernel-server
在以上三台机器上创建共享目录
$ mkdir /opt/exhibitor/conf/
编辑了,/etc/exports
并在上述所有三台机器中添加了这样的条目-
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/opt/exhibitor/conf/ 10.66.136.129(rw)
/opt/exhibitor/conf/ 10.66.138.181(rw)
/opt/exhibitor/conf/ 10.66.138.183(rw)
我尝试从机器B和机器C如下安装在机器A上,这给了我这个错误-
root@machineB:/# sudo mount -t nfs 10.66.136.129:/opt/exhibitor/conf /opt/exhibitor/conf/
mount.nfs: access denied by server while mounting 10.66.136.129:/opt/exhibitor/conf
root@machineC:/# sudo mount -t nfs 10.66.136.129:/opt/exhibitor/conf /opt/exhibitor/conf/
mount.nfs: access denied by server while mounting 10.66.136.129:/opt/exhibitor/conf
我的/etc/exports
文件看起来好吗?我很确定,我已经弄乱了exports
文件。因为我在导出文件中的所有三台机器中都有相同的内容。
知道我在这里做什么错吗?正确的/exports
文件在哪里?
0750
,0700
则尝试挂载的客户端很可能会失败,并显示相同的错误消息。我将主机从更改0750
为0755
,然后错误消失了,一切都很好。