免费注册 查看新帖 |

Chinaunix

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

[开发环境] 请教一下,开发板挂载nfs时遇到不能挂载的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-08-17 18:56 |只看该作者 |倒序浏览
本帖最后由 tamujin 于 2011-08-19 14:11 编辑

想在开发板启动的时候加载nfs。

在linux主机编辑的/etc/exports 文件,添加了如下内容:

/home/<useracct>/workdir/filesys *(rw,no_root_squash,no_all_squash,sync)



linux主机我开启了portmap和nfs服务,也关闭了防火墙。在主机挂载设置的nfs目录:mount –t nfs  211.71.69.97:/home/useracct/workdir/filesys /mnt,然后在/mnt下可以看到挂载目录的内容。



启动开发板后在u-boot设置自动加载nfs文件系统,

U-Boot>setenv bootargs bootargs=men=64M console=ttyS0,115200 root=/dev/nfs rw nfsroot=211.71.69.97:/home/useracct/workdir/filesys ip=211.71.69.184:211.71.69.2:255.255.255.0

重启板子,然后依次加载u-boot、内核成功,然后无法加载上nfs文件系统:

把启动的最后几行贴上来:

ALSA device list:
  #0: DaVinci DM6467 EVM (tlv320aic3x)
TCP cubic registered
NET: Registered protocol family 17
Clocks: disable unused uart1
Clocks: disable unused emac
Clocks: disable unused timer1
emac-mii: probed
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
eth0: attached PHY driver [ET1011C] (mii_bus:phy_addr=1:01, id=282f013)
Sending DHCP requests .
PHY: 1:01 - Link is Up - 100/Full
..... timed out!
IP-Config: Retrying forever (NFS root)...
eth0: attached PHY driver [ET1011C] (mii_bus:phy_addr=1:01, id=282f013)
Sending DHCP requests .
PHY: 1:01 - Link is Up - 100/Full
....

请教大侠怎么解决这个问题呢?

我在linux主机 #tail  -f  /var/log/messages

显示如下内容:
[root@localhost yx]# tail -f /var/log/messages
Aug 19 19:49:38 localhost kernel: e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
Aug 19 19:49:38 localhost kernel: e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO
Aug 19 19:49:38 localhost NetworkManager[1247]: <info> (eth0): carrier now ON (device state 8 )
Aug 19 19:49:38 localhost lldpad[1198]: vdp_ifup:eth0 vdp data already exists !
Aug 19 21:55:56 localhost rpcbind: rpcbind terminating on signal. Restart with "rpcbind -w"
Aug 19 21:56:03 localhost rpc.mountd[3646]: Caught signal 15, un-registering and exiting.
Aug 19 21:56:03 localhost kernel: nfsd: last server has exited, flushing export cache
Aug 19 21:56:04 localhost kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Aug 19 21:56:04 localhost kernel: NFSD: starting 90-second grace period
Aug 19 21:56:04 localhost rpc.mountd[5211]: Version 1.2.3 starting

论坛徽章:
0
2 [报告]
发表于 2011-08-17 19:59 |只看该作者
回复 1# tamujin


    你的上位机上没有安装NFS服务器吧?

论坛徽章:
0
3 [报告]
发表于 2011-08-18 10:39 |只看该作者
想在开发板启动的时候加载nfs。



linux主机我开启了portmap和nfs服务,也关闭了防火墙。在主机挂载设 ...
tamujin 发表于 2011-08-17 18:56



    信息已经很清楚了,你的问题在NFS服务器配置的不对,或者server没正确的启动起来。
(把你的NFS端得LOG贴出来看看,#tail -f  /var/log/message)

给你点小建议:找另外一个NFS客户端,试试你的NFS服务器

论坛徽章:
0
4 [报告]
发表于 2011-08-18 15:48 |只看该作者
回复 2# daniel_kohler


    我直接编辑的/etc/exports 文件,添加了如下内容:

/home/<useracct>/workdir/filesys *(rw,no_root_squash,no_all_squash,sync)

这样还需要装nfs服务器吗?Redhat上好像自己没有装,要是还需要装的话能不能给我说个详细名称啊

论坛徽章:
0
5 [报告]
发表于 2011-08-18 15:53 |只看该作者
回复 3# yydsr0278


    在nfs服务端,我输入tail -f /var/log/message
  提示没有那个文件啊

论坛徽章:
0
6 [报告]
发表于 2011-08-18 16:52 |只看该作者
回复 4# tamujin


    详细的名称我记不起来了,你去redhat的安装盘上找找看,比如包括*nfs*的关键字等等

论坛徽章:
0
7 [报告]
发表于 2011-08-18 16:54 |只看该作者
回复 5# tamujin


    那你要看看是不是其他的文件了,现在新的redhat更新的很快,你去看看(/var/log下找找看,应该不会去到其他的目录)

论坛徽章:
0
8 [报告]
发表于 2011-08-19 09:14 |只看该作者
回复 6# yydsr0278


    今天我看了一下linux主机系统版本,是redhat 6.1,之前我装了个portmap-4.0是用在redhat 5的,然后我就把portmap-4.0卸载了,然后系统里装有nfs-utils和rpmband,好像redhat 6.1中rpmband就起到了portap的作用。
   不过现在的问题是,用开发板启动的时候加载nfs还是有问题:

ALSA device list:
  #0: DaVinci DM6467 EVM (tlv320aic3x)
TCP cubic registered
NET: Registered protocol family 17
Clocks: disable unused uart1
Clocks: disable unused emac
Clocks: disable unused timer1
emac-mii: probed
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
eth0: attached PHY driver [ET1011C] (mii_bus:phy_addr=1:01, id=282f013)
Sending DHCP requests .
PHY: 1:01 - Link is Up - 100/Full
..... timed out!
IP-Config: Retrying forever (NFS root)...
eth0: attached PHY driver [ET1011C] (mii_bus:phy_addr=1:01, id=282f013)
Sending DHCP requests .
PHY: 1:01 - Link is Up - 100/Full
....

总是这样子。

但是我把ext2的文件系统烧写到flash,让文件系统从flash加载之后,然后再
mount -t nfs 211.71.69.97:/home/useracct/workdir/filesys /mnt
这样却可以看到nfs中的内容,请问这是怎么回事呢?

论坛徽章:
0
9 [报告]
发表于 2011-08-19 09:18 |只看该作者
回复 7# yydsr0278

我把ext2的文件系统烧写到flash,让文件系统从flash加载之后,然后再
mount -t nfs 211.71.69.97:/home/useracct/workdir/filesys /mnt
这样可以看到nfs中的内容,这是不是说,在nfs客户端可以加载nfs了呢?

用开发板启动的时候加载nfs还是有问题:

ALSA device list:
  #0: DaVinci DM6467 EVM (tlv320aic3x)
TCP cubic registered
NET: Registered protocol family 17
Clocks: disable unused uart1
Clocks: disable unused emac
Clocks: disable unused timer1
emac-mii: probed
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
eth0: attached PHY driver [ET1011C] (mii_bus:phy_addr=1:01, id=282f013)
Sending DHCP requests .
PHY: 1:01 - Link is Up - 100/Full
..... timed out!
IP-Config: Retrying forever (NFS root)...
eth0: attached PHY driver [ET1011C] (mii_bus:phy_addr=1:01, id=282f013)
Sending DHCP requests .
PHY: 1:01 - Link is Up - 100/Full
....


在U-boot中我设置:

setenv bootcmd nboot 0x80700000 0 0x160000\; bootm
setenv bootargs men=112M console=ttyS0,115200 root=/dev/nfs rw nfsroot=211.71.69.97:/home/useracct/workdir/filesys ip=211.71.69.55:211.71.69.2:255.255.255.0
上面设置从nfs启动正确吗?

论坛徽章:
0
10 [报告]
发表于 2011-08-19 14:14 |只看该作者
回复 3# yydsr0278


    我把/var/log/messages 的内容贴一下,上次可能是目录写错了/usr,才提示找不到文件。但是我没看懂信息的内容啊

[root@localhost yx]# tail -f /var/log/messages
Aug 19 19:49:38 localhost kernel: e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
Aug 19 19:49:38 localhost kernel: e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO
Aug 19 19:49:38 localhost NetworkManager[1247]: <info> (eth0): carrier now ON (device state 8 )
Aug 19 19:49:38 localhost lldpad[1198]: vdp_ifup:eth0 vdp data already exists !
Aug 19 21:55:56 localhost rpcbind: rpcbind terminating on signal. Restart with "rpcbind -w"
Aug 19 21:56:03 localhost rpc.mountd[3646]: Caught signal 15, un-registering and exiting.
Aug 19 21:56:03 localhost kernel: nfsd: last server has exited, flushing export cache
Aug 19 21:56:04 localhost kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Aug 19 21:56:04 localhost kernel: NFSD: starting 90-second grace period
Aug 19 21:56:04 localhost rpc.mountd[5211]: Version 1.2.3 starting
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP