nfs文件系统挂载不成功
最近学习linux。我通过nfs文件系统挂载不成功。我是想通过PC机的linux系统关在到我的开发板。在pc机本身上是可以挂载成功。但是想在开发板上挂载到PC机上就不行了。使用的命令如下
# 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
从打印来看nolock参数不对,确认一下用法
检查一下参数吧~ 语法问题: -t nfs后要加空格,别mount到/tmp目录。你的fstab没有关于nfs的入口项。
# mount -o nolock-t nfs $SEVER_IP:/home/xxw /mnt/nfs
ymind 发表于 2013-1-7 09:07 static/image/common/back.gif
语法问题: -t nfs后要加空格,别mount到/tmp目录。你的fstab没有关于nfs的入口项。
# mount -o nolock-t...
# 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
# mount -o nolock -t nfs 192.168.1.100:/home/xxw /tmp/nfs
mount: RPC: Unable to receive; errno = Connection refused
# mount192.168.1.100:/home/xxw /tmp/nfs
mount: RPC: Unable to receive; errno = Connection refused
# mount -o nolock -t nfs 192.168.1.100:/home/xxw /tmp/nfs
我在开发板端测试了主机的网络是联通的,然后按照你说的命令尝试了下,结果如上。
是不是我的开发板上缺少什么文件,导致nfs挂载不成功 检查NFS server的防火墙设置(iptables -L), host access control文件(/etc/hosts.deny), 和NFS设置(/etc/exports).
都要允许你开发板的ip address使用NFS.
ymind 发表于 2013-1-7 13:07 static/image/common/back.gif
检查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)
# 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
我觉的可能是目标板什么地方有问题。 也就是说,主机(192.168.1.100)能ping通开发板(192.168.1.6),但反之则不通,对吗?
1. 在开发板侧能使用telnet, ftp等登录主机吗?
2. 主机Linux是装在虚拟机之上的吗?
3. 主机与开发板之间是交换机,还是经过了老式HUB?
4. 在开发板侧运行命令ifconfig -a, 和cat /proc/interrupts,我看看结果。在ping之前,之后各运行一遍。 ymind 发表于 2013-1-8 08:26 static/image/common/back.gif
也就是说,主机(192.168.1.100)能ping通开发板(192.168.1.6),但反之则不通,对吗?
1. 在开发板侧能使用te ...
非常感谢大侠》
我来说一下我这边的情况:我主机的linux是装在虚拟机上的,目标板是一个2410的开发板。现在主机很目标板的连接是一根串口线和一根网线。串口线通过minicom来操作目标板。
主机端现象:IP:192.168.1.100.我再虚拟机上和windows上都是配置的一致的。然后在主机端现在是可以把/home/xxw挂载到/mnt的
下面是一些现象:
# 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
# cat /proc/interrupts
CPU0
0: 859675 XT-PICtimer
1: 393 XT-PICkeyboard
2: 0 XT-PICcascade
3: 345 XT-PICserial
5: 25 XT-PICvmxnet ether
8: 1 XT-PICrtc
9: 0 XT-PICvmci
10: 32 XT-PICusb-uhci
11: 32937 XT-PICioc0, ehci-hcd
12: 6246 XT-PICPS/2 Mouse
15: 66777 XT-PICide1
NMI: 0
ERR: 0
# 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
# 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
目标板上的一些现象:
# 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
+Done(127) AT S7=45 S0=0 L1 V1 X4
# ifconfig
eth0 Link encap:EthernetHWaddr 10:23:45:67:89:AB
inet addr:192.168.1.6Bcast:192.168.1.255Mask:255.255.255.0
UP BROADCAST RUNNING MULTICASTMTU:1500Metric: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.1Mask:255.0.0.0
UP LOOPBACK RUNNINGMTU:16436Metric: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)
# cat /proc/interrupts
CPU0
30: 1728917 s3cS3C2410 Timer Tick
32: 0 s3cs3c2410-lcd
33: 0 s3cs3c-mci
37: 21 s3cs3c-mci
41: 1 s3cs3c2410_udc
42: 0 s3cohci_hcd:usb1
43: 0 s3cs3c2440-i2c
51: 782 s3c-exteth0
60: 0 s3c-exts3c-mci
70: 112 s3c-uart0s3c2440-uart
71: 241 s3c-uart0s3c2440-uart
79: 0 s3c-adcTQ2440 TouchScreen
80: 0 s3c-adcadc, TQ2440 TouchScreen
83: 0 -s3c2410-wdt
Err: 0
# 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
忘大神能解答一下
mount -o nolock-t nfs 192.168.1.100:/home/xxw /tmp
vkic007 发表于 2013-1-9 14:03 static/image/common/back.gif
非常感谢大侠》
我来说一下我这边的情况:我主机的linux是装在虚拟机上的,目标板是一个2410的开发板。现 ...
初步看,应该是虚拟机配置问题,并检查确省网关设置。我认为,主机Linux能ping通开发板,实际是Windows/VMWARE通了,Linux下并没通。
页:
[1]