打印

nfs文件系统挂载不成功

[复制链接]
8428|10
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
vkic007|  楼主 | 2013-1-6 15:38 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
最近学习linux。我通过nfs文件系统挂载不成功。
我是想通过PC机的linux系统关在到我的开发板。在pc机本身上是可以挂载成功。但是想在开发板上挂载到PC机上就不行了。使用的命令如下
[root@EmbedSky /etc]# mount -o nolock  -t nfs:/home/xxw /tmp
tmpfs: No value for mount option 'nolock'
mount: mounting tmpfs on /tmp failed: Invalid argument
是不是我的Linux中fstab文件的配置有问题
#device         mount-point     type    options         dump    fsck order
proc            /proc           proc    defaults                0       0
tmpfs           /tmp            tmpfs   defaults                0       0
sysfs           /sys            sysfs   defaults                0       0
tmpfs           /dev            tmpfs   defaults                0       0
var             /dev            tmpfs   defaults                0       0
ramfs           /dev            ramfs   defaults                0       0

相关帖子

沙发
jlass| | 2013-1-6 17:28 | 只看该作者
从打印来看nolock参数不对,确认一下用法

使用特权

评论回复
板凳
hxh360| | 2013-1-6 20:23 | 只看该作者
检查一下参数吧~

使用特权

评论回复
地板
ymind| | 2013-1-7 09:07 | 只看该作者
语法问题: -t nfs后要加空格,别mount到/tmp目录。你的fstab没有关于nfs的入口项。
# mount -o nolock  -t nfs $SEVER_IP:/home/xxw /mnt/nfs

使用特权

评论回复
5
vkic007|  楼主 | 2013-1-7 12:03 | 只看该作者
ymind 发表于 2013-1-7 09:07
语法问题: -t nfs后要加空格,别mount到/tmp目录。你的fstab没有关于nfs的入口项。
# mount -o nolock  -t  ...

[root@EmbedSky /]# ping 192.168.1.100
PING 192.168.1.100 (192.168.1.100): 56 data bytes
64 bytes from 192.168.1.100: seq=0 ttl=64 time=5.277 ms
64 bytes from 192.168.1.100: seq=1 ttl=64 time=0.949 ms
64 bytes from 192.168.1.100: seq=2 ttl=64 time=0.949 ms
64 bytes from 192.168.1.100: seq=3 ttl=64 time=0.956 ms
^C
--- 192.168.1.100 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.949/2.032/5.277 ms
[root@EmbedSky /]# mount -o nolock -t nfs 192.168.1.100:/home/xxw /tmp/nfs
mount: RPC: Unable to receive; errno = Connection refused
[root@EmbedSky /]# mount  192.168.1.100:/home/xxw /tmp/nfs
mount: RPC: Unable to receive; errno = Connection refused
[root@EmbedSky /]# mount -o nolock -t nfs 192.168.1.100:/home/xxw /tmp/nfs

我在开发板端测试了主机的网络是联通的,然后按照你说的命令尝试了下,结果如上。
是不是我的开发板上缺少什么文件,导致nfs挂载不成功

使用特权

评论回复
6
ymind| | 2013-1-7 13:07 | 只看该作者
检查NFS server的防火墙设置(iptables -L), host access control文件(/etc/hosts.deny), 和NFS设置(/etc/exports).
都要允许你开发板的ip address使用NFS.

使用特权

评论回复
7
vkic007|  楼主 | 2013-1-7 14:07 | 只看该作者
ymind 发表于 2013-1-7 13:07
检查NFS server的防火墙设置(iptables -L), host access control文件(/etc/hosts.deny), 和NFS设置(/etc ...

那些我都设置过了。我在host上尝试过挂载,是可以在host把执行mount /home/xxw  /mnt,并且结果显示是成功了的。然后我再host上测试ping 192.168.1.6(192.168.1.6目标板的ip)
[root@localhost root]# ping 192.168.1.6
PING 192.168.1.6 (192.168.1.6) 56(84) bytes of data.
From 192.168.1.100 icmp_seq=1 Destination Host Unreachable
From 192.168.1.100 icmp_seq=2 Destination Host Unreachable
From 192.168.1.100 icmp_seq=3 Destination Host Unreachable
From 192.168.1.100 icmp_seq=4 Destination Host Unreachable
From 192.168.1.100 icmp_seq=5 Destination Host Unreachable
From 192.168.1.100 icmp_seq=6 Destination Host Unreachable
From 192.168.1.100 icmp_seq=7 Destination Host Unreachable
From 192.168.1.100 icmp_seq=8 Destination Host Unreachable
From 192.168.1.100 icmp_seq=9 Destination Host Unreachable

--- 192.168.1.6 ping statistics ---
10 packets transmitted, 0 received, +9 errors, 100% packet loss, time 9026ms
, pipe 3
我觉的可能是目标板什么地方有问题。

使用特权

评论回复
8
ymind| | 2013-1-8 08:26 | 只看该作者
也就是说,主机(192.168.1.100)能ping通开发板(192.168.1.6),但反之则不通,对吗?
1. 在开发板侧能使用telnet, ftp等登录主机吗?
2. 主机Linux是装在虚拟机之上的吗?
3. 主机与开发板之间是交换机,还是经过了老式HUB?
4. 在开发板侧运行命令ifconfig -a, 和cat /proc/interrupts,我看看结果。在ping之前,之后各运行一遍。

使用特权

评论回复
9
vkic007|  楼主 | 2013-1-9 14:03 | 只看该作者
ymind 发表于 2013-1-8 08:26
也就是说,主机(192.168.1.100)能ping通开发板(192.168.1.6),但反之则不通,对吗?
1. 在开发板侧能使用te ...

非常感谢大侠》
我来说一下我这边的情况:我主机的linux是装在虚拟机上的,目标板是一个2410的开发板。现在主机很目标板的连接是一根串口线和一根网线。串口线通过minicom来操作目标板。
主机端现象:IP:192.168.1.100.我再虚拟机上和windows上都是配置的一致的。然后在主机端现在是可以把/home/xxw  挂载到/mnt的
下面是一些现象:
[root@localhost root]# ping 192.168.1.6
PING 192.168.1.6 (192.168.1.6) 56(84) bytes of data.
From 192.168.1.100 icmp_seq=1 Destination Host Unreachable
From 192.168.1.100 icmp_seq=2 Destination Host Unreachable
From 192.168.1.100 icmp_seq=3 Destination Host Unreachable
From 192.168.1.100 icmp_seq=4 Destination Host Unreachable
From 192.168.1.100 icmp_seq=5 Destination Host Unreachable
From 192.168.1.100 icmp_seq=6 Destination Host Unreachable
From 192.168.1.100 icmp_seq=7 Destination Host Unreachable
From 192.168.1.100 icmp_seq=8 Destination Host Unreachable
From 192.168.1.100 icmp_seq=9 Destination Host Unreachable

--- 192.168.1.6 ping statistics ---
10 packets transmitted, 0 received, +9 errors, 100% packet loss, time 9104ms
, pipe 3
[root@localhost root]# cat /proc/interrupts
           CPU0
  0:     859675          XT-PIC  timer
  1:        393          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  3:        345          XT-PIC  serial
  5:         25          XT-PIC  vmxnet ether
  8:          1          XT-PIC  rtc
  9:          0          XT-PIC  vmci
10:         32          XT-PIC  usb-uhci
11:      32937          XT-PIC  ioc0, ehci-hcd
12:       6246          XT-PIC  PS/2 Mouse
15:      66777          XT-PIC  ide1
NMI:          0
ERR:          0
[root@localhost root]# ping 192.168.1.100
PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
64 bytes from 192.168.1.100: icmp_seq=1 ttl=64 time=0.205 ms
64 bytes from 192.168.1.100: icmp_seq=2 ttl=64 time=0.050 ms
64 bytes from 192.168.1.100: icmp_seq=3 ttl=64 time=0.024 ms
64 bytes from 192.168.1.100: icmp_seq=4 ttl=64 time=0.023 ms
64 bytes from 192.168.1.100: icmp_seq=5 ttl=64 time=0.028 ms

--- 192.168.1.100 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3996ms
rtt min/avg/max/mdev = 0.023/0.066/0.205/0.070 ms
[root@localhost root]# ping 192.168.1.6
PING 192.168.1.6 (192.168.1.6) 56(84) bytes of data.
From 192.168.1.100 icmp_seq=1 Destination Host Unreachable
From 192.168.1.100 icmp_seq=2 Destination Host Unreachable
From 192.168.1.100 icmp_seq=3 Destination Host Unreachable
From 192.168.1.100 icmp_seq=4 Destination Host Unreachable
From 192.168.1.100 icmp_seq=5 Destination Host Unreachable
From 192.168.1.100 icmp_seq=6 Destination Host Unreachable

--- 192.168.1.6 ping statistics ---
8 packets transmitted, 0 received, +6 errors, 100% packet loss, time 7076ms
, pipe 3
目标板上的一些现象:
[root@EmbedSky /]# ping 192.168.1.100
PING 192.168.1.100 (192.168.1.100): 56 data bytes
64 bytes from 192.168.1.100: seq=0 ttl=64 time=5.923 ms
64 bytes from 192.168.1.100: seq=1 ttl=64 time=0.952 ms
64 bytes from 192.168.1.100: seq=2 ttl=64 time=0.952 ms
64 bytes from 192.168.1.100: seq=3 ttl=64 time=0.950 ms
64 bytes from 192.168.1.100: seq=4 ttl=64 time=0.817 ms
^C
--- 192.168.1.100 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.817/1.918/5.923 ms
[1]+  Done(127)                  AT S7=45 S0=0 L1 V1 X4
[root@EmbedSky /]# ifconfig
eth0      Link encap:Ethernet  HWaddr 10:23:45:67:89:AB
          inet addr:192.168.1.6  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:733 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:102754 (100.3 KiB)  TX bytes:532 (532.0 B)
          Interrupt:51 Base address:0x4000
                                                                                
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
                                                                                
[root@EmbedSky /]# cat /proc/interrupts
           CPU0
30:    1728917         s3c  S3C2410 Timer Tick
32:          0         s3c  s3c2410-lcd
33:          0         s3c  s3c-mci
37:         21         s3c  s3c-mci
41:          1         s3c  s3c2410_udc
42:          0         s3c  ohci_hcd:usb1
43:          0         s3c  s3c2440-i2c
51:        782     s3c-ext  eth0
60:          0     s3c-ext  s3c-mci
70:        112   s3c-uart0  s3c2440-uart
71:        241   s3c-uart0  s3c2440-uart
79:          0     s3c-adc  TQ2440 TouchScreen
80:          0     s3c-adc  adc, TQ2440 TouchScreen
83:          0           -  s3c2410-wdt
Err:          0
[root@EmbedSky /]# ping 192.168.1.100
PING 192.168.1.100 (192.168.1.100): 56 data bytes
64 bytes from 192.168.1.100: seq=0 ttl=64 time=7.068 ms
64 bytes from 192.168.1.100: seq=1 ttl=64 time=0.949 ms
64 bytes from 192.168.1.100: seq=2 ttl=64 time=0.808 ms
64 bytes from 192.168.1.100: seq=3 ttl=64 time=0.954 ms
64 bytes from 192.168.1.100: seq=4 ttl=64 time=0.955 ms
64 bytes from 192.168.1.100: seq=5 ttl=64 time=0.952 ms
64 bytes from 192.168.1.100: seq=6 ttl=64 time=0.950 ms
^C
--- 192.168.1.100 ping statistics ---
7 packets transmitted, 7 packets received, 0% packet loss
round-trip min/avg/max = 0.808/1.805/7.068 ms
忘大神能解答一下

使用特权

评论回复
10
zyingjie| | 2013-1-9 19:20 | 只看该作者
mount -o nolock  -t nfs 192.168.1.100:/home/xxw /tmp

使用特权

评论回复
11
ymind| | 2013-1-10 08:37 | 只看该作者
vkic007 发表于 2013-1-9 14:03
非常感谢大侠》
我来说一下我这边的情况:我主机的linux是装在虚拟机上的,目标板是一个2410的开发板。现 ...

初步看,应该是虚拟机配置问题,并检查确省网关设置。我认为,主机Linux能ping通开发板,实际是Windows/VMWARE通了,Linux下并没通。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:志不强者智不达

18

主题

365

帖子

1

粉丝