嵌入式环境:挂载开发板根NFS文件系统失败
2015-12-05 22:59
627 查看
挂载开发板根NFS文件系统的时候,发现了下面的问题:
Looking up port of RPC 100003/2 on 192.168.1.106
rpcbind: server 192.168.1.106 not responding, timed out
Root-NFS: Unable to get nfsd port number from server, using default
Looking up port of RPC 100005/1 on 192.168.1.106
rpcbind: server 192.168.1.106 not responding, timed out
Root-NFS: Unable to get mountd port number from server, using default
原来是linux server的防火墙没有关。
---------------------------------------
另外:
出现这个问题,不一定就是这一个原因,还有
1.开发板的bootloader的 bootargs没有设置正确导致找不到server 的nfs,一般格式如下:
set bootargs noinitrd root=/dev/nfs nfsroot=192.168.1.106:/home/fs/work/nfs_root/fs_qtopia ip=192.168.1.111:192.168.1.106:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC0
2.另外挂载nfs需要启动nfs服务,并设置好nfs exports目录,
相关链接:
nfs服务以及mount命令使用 http://blog.itpub.net/23073818/viewspace-757312/
1、在A机上启动NFS和RPC服务
/etc/init.d/portmap start
/etc/init.d/nfs start
2、检查NFS的运行级别:
chkconfig --list portmap
chkconfig --list nfs
3、根据需要设置在相应的运行级别自动启动NFS:
chkconfig --level 235 portmap on
chkconfig --level 235 nfs on
--检测nfs 的rpc 注册状态
rpcinfo -u 主机名或IP 地址 进程
[root@tmg133 data3]#-- rpcinfo -u 192.168.1.106 nfs
program 100003 version 2 ready and waiting
program 100003 version 3 ready and waiting
program 100003 version 4 ready and waiting
[root@tmg133 data3]# --rpcinfo -u 192.168.1.106 mount
program 100005 version 1 ready and waiting
program 100005 version 2 ready and waiting
program 100005 version 3 ready and waiting
--查看共享目录和参数设置 cat /var/lib/nfs/etab
/home/fs/work/nfs_root/fs_mini_mdev *(rw,sync,wdelay,hide,nocrossmnt,secure,no_root_squash,no_all_squash,no_subtree_check,secure_locks,acl,mapping=identity,anonuid=65534,anongid=65534)
/home/fs/work/nfs_root/fs_qtopia *(rw,sync,wdelay,hide,nocrossmnt,secure,no_root_squash,no_all_squash,no_subtree_check,secure_locks,acl,mapping=identity,anonuid=65534,anongid=65534)
~ (ro,sync,wdelay,hide,nocrossmnt,secure,root_squash,no_all_squash,no_subtree_check,secure_locks,acl,mapping=identity,anonuid=65534,anongid=65534)
用命令行方式关闭CentOS防火墙 http://blog.163.com/zhaoweibiao87@126/blog/static/13479948120126611325557/
临时性的完全关闭防火墙,可以不重启机器:
#/etc/init.d/iptables status ## 查看防火墙状态
#/etc/init.d/iptables stop ## 本次关闭防火墙
#/etc/init.d/iptables restart ## 重启防火墙
Looking up port of RPC 100003/2 on 192.168.1.106
rpcbind: server 192.168.1.106 not responding, timed out
Root-NFS: Unable to get nfsd port number from server, using default
Looking up port of RPC 100005/1 on 192.168.1.106
rpcbind: server 192.168.1.106 not responding, timed out
Root-NFS: Unable to get mountd port number from server, using default
原来是linux server的防火墙没有关。
---------------------------------------
另外:
出现这个问题,不一定就是这一个原因,还有
1.开发板的bootloader的 bootargs没有设置正确导致找不到server 的nfs,一般格式如下:
set bootargs noinitrd root=/dev/nfs nfsroot=192.168.1.106:/home/fs/work/nfs_root/fs_qtopia ip=192.168.1.111:192.168.1.106:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC0
2.另外挂载nfs需要启动nfs服务,并设置好nfs exports目录,
/etc/init.d/nfs start [root@localhost fs]# vi /etc/exports /home/fs/work/nfs_root/fs_mini_mdev *(rw,sync,no_root_squash,no_subtree_check) /home/fs/work/nfs_root/fs_qtopia *(rw,sync,no_root_squash,no_subtree_check)
相关链接:
nfs服务以及mount命令使用 http://blog.itpub.net/23073818/viewspace-757312/
1、在A机上启动NFS和RPC服务
/etc/init.d/portmap start
/etc/init.d/nfs start
2、检查NFS的运行级别:
chkconfig --list portmap
chkconfig --list nfs
3、根据需要设置在相应的运行级别自动启动NFS:
chkconfig --level 235 portmap on
chkconfig --level 235 nfs on
--检测nfs 的rpc 注册状态
rpcinfo -u 主机名或IP 地址 进程
[root@tmg133 data3]#-- rpcinfo -u 192.168.1.106 nfs
program 100003 version 2 ready and waiting
program 100003 version 3 ready and waiting
program 100003 version 4 ready and waiting
[root@tmg133 data3]# --rpcinfo -u 192.168.1.106 mount
program 100005 version 1 ready and waiting
program 100005 version 2 ready and waiting
program 100005 version 3 ready and waiting
--查看共享目录和参数设置 cat /var/lib/nfs/etab
/home/fs/work/nfs_root/fs_mini_mdev *(rw,sync,wdelay,hide,nocrossmnt,secure,no_root_squash,no_all_squash,no_subtree_check,secure_locks,acl,mapping=identity,anonuid=65534,anongid=65534)
/home/fs/work/nfs_root/fs_qtopia *(rw,sync,wdelay,hide,nocrossmnt,secure,no_root_squash,no_all_squash,no_subtree_check,secure_locks,acl,mapping=identity,anonuid=65534,anongid=65534)
~ (ro,sync,wdelay,hide,nocrossmnt,secure,root_squash,no_all_squash,no_subtree_check,secure_locks,acl,mapping=identity,anonuid=65534,anongid=65534)
用命令行方式关闭CentOS防火墙 http://blog.163.com/zhaoweibiao87@126/blog/static/13479948120126611325557/
临时性的完全关闭防火墙,可以不重启机器:
#/etc/init.d/iptables status ## 查看防火墙状态
#/etc/init.d/iptables stop ## 本次关闭防火墙
#/etc/init.d/iptables restart ## 重启防火墙
相关文章推荐
- LeetCode86 Partition List
- Android中Activity生命周期以及启动模式
- 认识标签<一>
- 分享使用AngularJS创建应用的5个框架
- mysql自动备份脚本
- C 语言中用bsearch()实现查找操作
- Ajax 上传文件,返回JSON字符串在FireFox下解析带有<pre>标签的解决办法
- 轻量级HA服务keepalived简介及配置解析
- Java Nio 一、Java NIO教程
- JavaScript变量作用域和变量提升解释(JavaScript Variable Scope and Hoisting Explained)
- SqlServer存储过程(增删改查)
- Bootstrap分为几部分?
- 简单的联动菜单
- Fragment放置后台很久(Home键退出很长时间),返回时出现Fragment重叠解决方案
- 在eclipse中配置好hadoop的插件后使用DFS遇到的问题
- SQL语句的增删改查
- 技术资料备份(持续更新)
- 分享一百多套开发视频教程的下载地址
- Webstorm常用的快捷键
- Python OpenCV 图片反色、调整大小、遍历、导出txt