a c*_*der 4 linux nfs network-share windows-server-2012
我使用以下方法创建了 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
Run Code Online (Sandbox Code Playgroud)
其中uuu.uuu.uuu.uuu是我的 Ubuntu 系统的 IP。
接下来,我从 Ubuntu 机器上安装了 Windows NFS 共享,如下所示:
sudo mount -t nfs xxx.xxx.xxx.xxx:/testshare2 /mnt/testshare2
Run Code Online (Sandbox Code Playgroud)
其中xxx.xxx.xxx.xxx是 Windows Server 2012 机器的 IP。
挂载时没有显示错误,但是当我ls挂载目录时,会出现以下内容:
ls: cannot open directory /mnt/testshare2/: Input/output error
我没有在 Ubuntu 的系统日志中显示任何错误。
编辑 1:尝试从 RHEL7 机器挂载 Server 2012 NFS 共享时,我收到相同的输入/输出错误。Mount 工作正常我只是不能 ls 目录或触摸文件。
编辑 2:在 Server 2012 中,NFS 日志显示成功挂载到 Ubuntu 和 RHEL 机器。
这就解决了。在服务器 2012 上:
打开 Server Manager -> Shares
删除了现有共享
删除了之前共享的文件夹
NFS Share - Quick然后单击下一步。

Type a custom path然后单击下一步。

Share name,local path并且remote paths然后单击下一步。

No server authentication
(AUTH_SYS),然后选择Enable unmapped user access by UID/GID
并确保选择了Allow unmapped user acess by UID/GID单选按钮。然后点击下一步。

在“共享权限”窗口中,我单击了Add。
Add Permissions弹出一个窗口。在这里,在 旁边Host,我输入了将要挂载的远程 Linux 计算机的 IP,左Language encoding至ANSI并设置Share permissions为
Read/Write。然后我点击Add底部关闭
Add Permissions窗口。



Confirm selections窗口上的设置,然后单击了Create按钮。

然后从我的RHEL7系统发出:
mount -t nfs sss.sss.sss.sss:/somedata /mnt/somedata/
Run Code Online (Sandbox Code Playgroud)
sss.sss.sss.sssServer 2012系统的IP在哪里。
在RHEL7机器上,我通过发出
date >> /mnt/somedata/date.txt
Run Code Online (Sandbox Code Playgroud)
然后检查该文件是否存在于Server 2012。