我使用以下命令创build了Windows Server 2012共享:
PS C:\Windows\system32> nfsshare testshare2=C:\testshare2 -o anon=yes anonuid=0 anongid=0 rw=uuu.uuu.uuu.uuu testshare2 was shared successfully
uuu.uuu.uuu.uuu是我的Ubuntu系统的IP。
接下来,在Ubuntu机器上,我按如下方式安装了Windows NFS共享:
sudo mount -t nfs xxx.xxx.xxx.xxx:/testshare2 /mnt/testshare2
其中xxx.xxx.xxx.xxx是Windows Server 2012计算机的IP。
挂载时没有显示错误,但是当我挂载目录时,出现以下内容:
ls: cannot open directory /mnt/testshare2/: Input/output error
我没有在Ubuntu的系统日志中显示任何错误。
以下是Server 2012中共享的属性:
编辑1 :尝试从RHEL7计算机安装Server 2012 NFS共享时出现相同的input/输出错误。 挂载工作正常我只是不能ls目录或触摸文件。
编辑2 :在Server 2012中,NFS日志显示成功挂载到Ubuntu和RHEL机器。
这个解决了。 在Server 2012上 :
打开Server Manager -> Shares
删除了现有的份额
删除以前共享的文件夹
使用New Share Wizard启动新的共享
NFS Share - Quick然后单击下一步。
Type a custom path然后单击下一步。
Share name , local path和remote paths然后单击下一步。
No server authentication (AUTH_SYS) ,然后select了Enable unmapped user access by UID/GID并确保选中了Allow unmapped user acess by UID/GID单选buttonAllow unmapped user acess by UID/GID 。 然后点击下一步。
在“共享权限”窗口中,我单击Add 。
popupAdd Permissions窗口。 这里,在Host旁边,我input了要装入的远程Linux计算机的IP,将Language encoding保留为ANSI ,并将Share permissions设置为Read/Write 。 然后我点击Add Permissions窗口底部的Add Permissions 。
Confirm selections窗口中确认了设置,然后点击了Createbutton。
然后从我的RHEL7系统发出:
mount -t nfs sss.sss.sss.sss:/somedata /mnt/somedata/
其中sss.sss.sss.sss是Server 2012系统的IP。
从RHEL7机器上,我确认通过发行写访问
date >> /mnt/somedata/date.txt
然后检查该文件是否存在于Server 2012中 。