我试图从Linux(名为roshan。version centos 5)到solaris(名为orchid version solaris 8)挂载一个目录。 我做了以下几点:
[root@roshan /]# cat /etc/exports /backup2 *(sync,rw,no_root_squash) /share_to_orichid orchid(sync,rw,no_root_squash) [root@roshan /]# exportfs -a
正如你所看到的,我从Linux共享目录。 现在我将从Solaris安装它
bash-2.05# mount roshan:/share_to_orchid /mount_from_roshan/ Permission denied
好。 问题出现了。 没有权限。 我尝试另一种方式。
[root@roshan /]# exportfs -o rw,no_root_squash orchid:/share_to_orchid/ [root@roshan /]#
现在从Solaris再次挂载它将成功
bash-2.05# mount roshan:/share_to_orchid /mount_from_roshan/ bash-2.05# cd /mount_from_roshan/
所以我的问题是为什么第一种方式失败。 第一种和第二种方式有什么不同?
好吧,只要列出这个答案,那么:在您描述的/etc/exports文件中有一个“orichid”的错字。
还要注意的是, showmount命令可以帮助检查远程机器的输出。 在这种情况下,从Solaris机器兰,你可以运行
showmount -e roshan
看看罗山出口什么地方 我的testing表明, exportfs会很乐意导出不存在的目录,但是您至less可以在检查时注意到这样的错字。