免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1881 | 回复: 5
打印 上一主题 下一主题

[文件系统] 启动挂载nfs根文件系统故障 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-06-16 12:34 |只看该作者 |倒序浏览

抓取nfs交互的网络包,发现nfs协议交互返回了一个错误状态
错误情况为:
Accept State: remote can't support version # (2)
Program Version (Minimum): 3
Program Version (Maximum): 4


字面上理解是
nfs服务器不支持v2版的nfs协议



请问有什么办法让linux内核选择v3版的协议挂载nfs吗?

论坛徽章:
0
2 [报告]
发表于 2014-06-16 13:08 |只看该作者
nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]

nfs-options加vers=3

论坛徽章:
15
射手座
日期:2014-02-26 13:45:082015年迎新春徽章
日期:2015-03-04 09:54:452015年辞旧岁徽章
日期:2015-03-03 16:54:15羊年新春福章
日期:2015-02-26 08:47:552015年亚洲杯之卡塔尔
日期:2015-02-03 08:33:45射手座
日期:2014-12-31 08:36:51水瓶座
日期:2014-06-04 08:33:52天蝎座
日期:2014-05-14 14:30:41天秤座
日期:2014-04-21 08:37:08处女座
日期:2014-04-18 16:57:05戌狗
日期:2014-04-04 12:21:33技术图书徽章
日期:2014-03-25 09:00:29
3 [报告]
发表于 2014-06-16 13:49 |只看该作者
# Protocol Version [2,3,4]
# This defines the default protocol version which will
# be used to start the negotiation with the server.
# Defaultvers=4
#
# Setting this option makes it mandatory the server supports the
# given version. The mount will fail if the given version is
# not support by the server.
# Nfsvers=4
/etc/nfsmount.con文件中也有相关参数。

论坛徽章:
0
4 [报告]
发表于 2014-06-16 14:31 |只看该作者
看了内核的帮助,貌似不行
nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
  <nfs-options>        Standard NFS options. All options are separated by commas.
                The following defaults are used:
                        port                = as given by server portmap daemon
                        rsize                = 4096
                        wsize                = 4096
                        timeo                = 7
                        retrans                = 3
                        acregmin        = 3
                        acregmax        = 60
                        acdirmin        = 30
                        acdirmax        = 60
                        flags                = hard, nointr, noposix, cto, ac

xs3c 发表于 2014-06-16 13:08
nfsroot=[:][,]

nfs-options加vers=3

论坛徽章:
0
5 [报告]
发表于 2014-06-16 21:41 |只看该作者
回复 4# inurl
你确定试过? 看代码里面fs/nfs/nfsroot.c
  1. #define NFS_DEF_OPTIONS     "vers=2,udp,rsize=4096,wsize=4096"
复制代码
应该加vers应该可以


   

论坛徽章:
0
6 [报告]
发表于 2014-06-17 13:53 |只看该作者
真的可以啊,不过有一点小的改动,把vers=3,改成nfsvers=3。

  1.         {Opt_v2, "nfsvers=2"},
  2.         {Opt_v2, "v2"},
  3.         {Opt_v3, "nfsvers=3"},
  4.         {Opt_v3, "v3"},
复制代码
我是在源码里面找到的。 看来kernel的document一点也不靠谱啊。
回复 5# xs3c


   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP