在Windows系统挂载linux NFS分享目录

来源:互联网 发布:数据库开发岗位认识 编辑:程序博客网 时间:2024/04/28 09:00

 

下载 Microsoft Windows Services for UNIX 3.5 (约 216MB)

        Windows Services for UNIX 3.5 系统需求

       下载地址:http://download.microsoft.com/download/a/1/c/a1ca7af1-a6e3-46e7-874a-4c5d8c0fb3b7/SFU35SEL_EN.exe

       解压缩到 C:\SFU35SEL_EN

‧安装

   只安装Client for NFS on Windows (只安装这个的话不需要重启机器)的操作命令,在Windows命令解释窗口输入 (可以手动安装,也可以用命令来安装,、) :

      msiexec /I C:\SFU35SEL_EN\sfusetup.msi /qb addlocal="NFSClient


   安装路径: C:\SFU
   安装完成后界面如下:
   


‧设置 User Name Mapping


将 ubuntu NFS Server 上的 /etc/passwd、/etc/group 两个文件复制到Windows 电脑中的 C:\

执行 Services for UNIX Administrator


点选 User Name Mapping

在 Configuration 页面中, 设定:

Password file path and name: c:\passwd

Group file path and name: c:\group

在 Maps 界面中, 设定:

点选Show User Maps → List Windows Users             


                    List UNIX Users

在 Windows users 清单中点选自己的帐号

在 UNIX users 清单中点选欲映射的帐号 (想要以哪个 UNIX 身份挂载 NFS Folder)

按 Add → 確定

按界面右上角的 Apply 完成设定。

Show Group Maps →List Windows Groups、List UNIX Groups    ( 同上操作 )

‧挂载 NFS 目录

Windows命令窗口:

cd \SFU\common
mount linux_ip:/path drive_id: (如: mount 192.168.30.6:/home/dir4 m:   将NFS上的文件dir4挂载到本地的M新盘,其中dir4在/etc/exports文件中设置成nfs共享目录)

‧测试


      向M:\中拷贝文件,算出其读写速度。

参考资料:

1.http://hi.baidu.com/heqk/blog/item/7c3a78cb08a96f13bf09e688.html

2.http://blog.csdn.net/bingzhuan/article/details/4795509

3.http://www.cnblogs.com/mutao/archive/2011/04/02/2003096.html

4.http://linux.chinaunix.net/techdoc/install/2006/03/21/929578.shtml

5.http://cha.homeip.net/blog/archives/2005/11/_windows_unix_n.html

windows 挂载 linux nfs,必须是/etc/exports中的共享目录,否则无法挂载

装了windows的nfs客户端,可以挂载ubuntu上共享的nfs目录,但却无法挂载glusterfs的volume,一挂载就报“Network Error - 31”错误,网上根本找不到这个错误资料

但在linux机器上,却是可以通过nfs来挂载volume的,在ubuntu server中,直接使用命令mount -t nfs server1:/test-volume /mnt/glusterfs来挂载,但在ubuntu桌面版中只能使用mount -o mountproto=tcp -t nfs server1:/test-volume /mnt/glusterfs才能挂载,即要加上tcp协议,不知道为什么原因?

有谁知道glusterfs的volume是否可以通过windwos的nfs客户端来挂载?估计windwos这个nfs客户端还不支持吧,有知道的大侠请告知一声。win7的内置nfs客户端,我也试了,可以成功挂载linux上的nfs共享目录,但挂载不了volume

装了服务器nfs-kernel-server后,就无法用nfs挂载这个主机上的glusterfs的volume,一挂载就会报mount.nfs:access denied by server的错误,如果是只装了nfs客户端的机器,挂载这个机器上的volume,就不会有问题。至于为什么会报那个错,网上查了一下资料,仍没有解决问题

报mount.nfs:access denied by server的错误参考资料:

1.http://forum.ubuntu.org.cn/viewtopic.php?t=152049

2.http://liuzhigong.blog.163.com/blog/static/17827237520115305226932/

3.http://blog.csdn.net/yuanxuran0101/article/details/5503834

4.http://hi.baidu.com/occupy8/blog/item/26e82e84e59b193bc65cc39e.html

showmount -e出错 :http://tonychiu.blog.51cto.com/656605/326546

如何组建和设定Ubuntu NFS服务器:

1.http://network.51cto.com/art/201008/216194.htm

2.http://hi.baidu.com/yss1983/blog/item/1eb1612777fae723c8955916.html

3.http://apps.hi.baidu.com/share/detail/17483923

原创粉丝点击