今天遇到一个相当奇怪的问题,在windows 上mount LINUX NFS, powershell 脚本可以成功, 用图形界面也可以成功,但BATCH就是不行。提示53网络错误.

不过公司已经有人踩过这个坑了看起来:)

原文在此:

http://www.ibm.com/support/knowledgecenter/SSFHJY_1.0.6/deploy/mount_the_nfs_share_on_windows_servers.html

  1. Ensure that you are logged into the Windows server as an administrator.
  2. Start the command console as the administrator (Click Start > All Programs > Accessories > Windows Powershell or Command Prompt)
  3. Right-click the Windows Powershell or Command Prompt, and select Run as administrator.
    Note: Ensure to select Windows Powershell, not Windows Powershell(x86).
  4. Run the following command to install FS-NFS-Services:

    servermanagercmd.exe -install FS-NFS-Services

  5. Open a command prompt with administrative rights. Run the following command:
    • For IBM Docs: umount –f W:
    • For File Viewer: umount –f Y:
  6. Run:

    nfsadmin client stop

  7. Open Regedit and navigate to the following branch:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default

  8. In the main window, right-click and select New > DWORD 32-bit Value. Set the name as AnonymousGID.
  9. Right-click and select New > DWORD 32-bit Value again. Set the name as AnonymousUID.
  10. Double-click on AnonymousGID and AnonymousUID, set the value as 0 and the base as Decimal respectively.
  11. Click OK.
  12. Close Regedit.
  13. In the command prompt, run:

    nfsadmin client start

  14. Close the Windows Powershell Console.
  15. Open a command prompt.
  16. Run the following command in a command prompt (not Powershell) to set the NFS configuration:

    nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i

  17. Run the following commands to mount the share:
    • For IBM Docs: mount -o mtype=soft retry=10 timeout=6 casesensitive=yes anon DocsLab01.renovations.com:/nfs/docs_data W:
    • For File Viewer: mount -o mtype=soft retry=10 timeout=6 casesensitive=yes anon DocsLab01.renovations.com:/nfs/viewer_data Y:
    Note: If you do not mount successfully, run umount –f W: or umount –f Y: and then repeat again.
  18. In order to mount the share automatically with windows restart:
    1. Create a batch file, for example, c:\IBMConversionNFS\nfsmount.bat, and type:

      mount -o mtype=soft retry=10 timeout=6 casesensitive=yes anon DocsLab01.renovations.com:/nfs/docs_data W:
      mount -o mtype=soft retry=10 timeout=6 casesensitive=yes anon DocsLab01.renovations.com:/nfs/viewer_data Y:
    2. Click Start > Administrative Tools > Task Scheduler.
    3. Click Create Task in Task Scheduler (Local).
    4. Click General, and type nfs_auto_mount for Name. In Security options, click Change User or Group > Advanced > Find Now, and select SYSTEM. Select Run with highest privileges, and click OK.
    5. Click Triggers > New, select At startup for Begin the task. Click OK.
    6. Click Actions > New > Browse, select c:\IBMConversionNFS\nfsmount.bat and click OK.
    7. Click OK.
    Note:

    • If the node and server are configured to start automatically along with the Windows Operating System, they will be system services running with a user name of SYSTEM. Looking at the services with the Task Manager, the user name for java.exe will show SYSTEM. In this case, the mount must also be done with a user of SYSTEM (as previously shown) or the NFS shares will not be able to be accessed from the node or server.
    • If the mount action is done using a user name of SYSTEM, the NFS shares will be able to be accessed regardless of what user name the node or server is running as.

更多NFS troubleshooting 参考:

https://wiki.archlinux.org/index.php/NFS/Troubleshooting

Mounting the NFS share on a Windows server的更多相关文章

  1. 如何在 windows server 2008 上面 挂载NFS

    首先, 你在一台服务器上面配置好NFS 服务器:然后按照一下步骤: mounting the nfs on windows server 2008 r2: open Windows Server 的D ...

  2. Windows Mount NFS Share from e.g. Linux

    Note: Not Stable, so steps below are for reference only ************ Linux Configuration NFS Share 1 ...

  3. Windows Server挂载NFS共享

    NFS:即为网络文件系统. 主要功能:通过网络(局域网)让不同的主机系统之间可以共享文件或目录. 主要用途:NFS网络文件系统一般被用来存储共享视频,图片,附件等静态资源文件. 关于端口使用说明: 1 ...

  4. Windows Server 2008 R2 添加且制成“NFS服务器”角色后与Unix客户端匿名访问常见问题

    在复杂的主机与网络环境中,我们可能会接触到多种主机与操作系统,配合Windows Server 2008 R2的原生“NFS服务器”功能可以让这样的复杂操作系统更方便应用. 然而面对网络上众多的帮助指 ...

  5. windows server 2008 R2 部署NFS,实现多台服务器间、客户端间的共享目录。

    如何通过Windows Server 2008 R2建立NFS存储服务? 通过Windows Server 2008 R2,我们可以很容易地将其作为一台NFS存储服务器,得到一个NFS软存储,轻松解决 ...

  6. Windows Server 2012 虚拟化实战:存储(一)

    在计算机世界我们随处可以见的一种方法,那就是抽象.1946年冯诺依曼提出了计算机的基本结构包含:计算器,存储器和I/O设备.这可能是对计算机这一新生事物最重要的一次抽象,它直接影响了今后几十年计算机软 ...

  7. macOS X Mount NFS Share / Set an NFS Client

    last updated November 3, 2018 in CategoriesLinux, Mac OS X, UNIX How do I access my enterprise NAS s ...

  8. Create Windows Server 2008 cluster from the command line

    How to create a Windows Server 2008 cluster from the command line? Creating a cluster in Server 2008 ...

  9. Windows server 2012 添加中文语言包(英文转为中文)(离线)

    Windows server 2012 添加中文语言包(英文转为中文)(离线) 相关资料: 公司环境:亚马孙aws虚拟机 英文版Windows2012 中文SQL Server2012安装包,需要安装 ...

随机推荐

  1. Linux core dump file详解

    Linux core dump file详解 http://www.cnblogs.com/langqi250/archive/2013/03/05/2944931.html

  2. python 复习 4-1 函数、参数、返回值、递归

    函数 完成特定功能的一个语句组,这个语句组可以作为一个单位使用,并且给它组语句取一个名子,即函数名 可以通过函数名在程序不同地方多次执行,即函数调用 预定义函数(可以直接使用) 自定义函数(自编写的) ...

  3. vue—你必须知道的

    更多总结 猛戳这里 属性与方法 不要在实例属性或者回调函数中(例如,vm.$watch('a', newVal => this.myMethod())使用箭头函数.因为箭头函数会绑定父级上下文, ...

  4. Selenium2+python自动化35-获取元素属性【转载】

    前言 通常在做断言之前,都要先获取界面上元素的属性,然后与期望结果对比.本篇介绍几种常见的获取元素属性方法. 一.获取页面title 1.有很多小伙伴都不知道title长在哪里,看下图左上角. 2.获 ...

  5. Appium+python自动化28-name定位【转载】

    本篇转自博客:上海-悠悠 前言 appium1.5以下老的版本是可以通过name定位的,新版本从1.5以后都不支持name定位了 一. name定位报错 1.最新版appium V1.7用name定位 ...

  6. java使用maven项目(二)分模块开发

    1       整合ssh框架 1.1     依赖传递 只添加了一个struts2-core依赖,发现项目中出现了很多jar, 这种情况 叫 依赖传递 1.2     依赖版本冲突的解决 1.  第 ...

  7. 在.NET4.5项目中添加HttpClient引用的办法

    一. 创建新项目 1. 打开  Microsoft Visual Studio 201 0,然后从 “ 文件 ” 菜单中选择 “ 新建项目 ” .在模板列表中,选择  Visual C#.在该区域下面 ...

  8. Chrome崩溃卡死

    Chrome崩溃卡死主要是Flash崩溃导致,解决办法:1,chrome://plugins,停用Chrome自带的Flash插件:2,停用GPU加速.chrome://flags,停用对所有网页执行 ...

  9. 更换介质:请把标有…… DVD 的盘片插入驱动器“/media/cdrom/”再按回车键“ 解决方法

    https://blog.csdn.net/no7oor/article/details/12776815

  10. 「转」基于Jmeter和Jenkins搭建性能测试框架

    搭建这个性能测试框架是希望能够让每个人(开发人员.测试人员)都能快速的进行性能测试,而不需要关注性能测试环境搭建过程.因为,往往配置一个性能环境可能需要很长的时间. 1.性能测试流程 该性能测试框架工 ...