今天配置一下NFS,实现linux与linux之间的共享,但是出现意外的神奇效果,奇怪呢
请看如下:
[root@bogon home]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:38:82:12
inet addr:192.168.189.128 Bcast:192.168.189.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe38:8212/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:272 errors:0 dropped:0 overruns:0 frame:0
TX packets:142 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:27310 (26.6 KiB) TX bytes:16135 (15.7 KiB)
Interrupt:67 Base address:0x2024
eth0 Link encap:Ethernet HWaddr 00:0C:29:38:82:12
inet addr:192.168.189.128 Bcast:192.168.189.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe38:8212/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:272 errors:0 dropped:0 overruns:0 frame:0
TX packets:142 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:27310 (26.6 KiB) TX bytes:16135 (15.7 KiB)
Interrupt:67 Base address:0x2024
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:7564 errors:0 dropped:0 overruns:0 frame:0
TX packets:7564 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10429224 (9.9 MiB) TX bytes:10429224 (9.9 MiB)
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:7564 errors:0 dropped:0 overruns:0 frame:0
TX packets:7564 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10429224 (9.9 MiB) TX bytes:10429224 (9.9 MiB)
[root@bogon home]# mount -t nfs 192.168.189.128:/home /mnt
mount: 192.168.189.128:/home failed, reason given by server: Permission denied
[root@bogon home]# mount -t nfs 192.168.189.127:/home /mnt
mount: mount to NFS server '192.168.189.127' failed: System Error: No route to host.
[root@bogon home]# ls /mnt/
hgfs
[root@bogon home]# vi /etc/exports //配置NFS的export文件,home为共享目录
[root@bogon home]# vi /etc/exports
[root@bogon home]# /etc/init.d/nfs start
启动 NFS 服务: [确定]
关掉 NFS 配额: [确定]
启动 NFS 守护进程: [失败] //这里提示NFS启动不成功,后面也能把本机的home目录挂载到本机mnt目录下,神奇!!
[root@bogon home]# vi /etc/exports
[root@bogon home]# mount -t nfs 192.168.189.128:/home /mnt
[root@bogon home]# ls /mnt //挂载后,直接在mnt目录下查看home目录的内容
Denny noodle test2 workdir.tar.gz
hello.c smb tftp-0.42-3.1.i386.rpm xinetd-2.3.14-10.el5.i386.rpm
home smb.conf tftp-server-0.42-3.1.i386.rpm
[root@bogon home]# umount /mnt
[root@bogon home]# ls /mnt
hgfs
[root@bogon home]#
mount: 192.168.189.128:/home failed, reason given by server: Permission denied
[root@bogon home]# mount -t nfs 192.168.189.127:/home /mnt
mount: mount to NFS server '192.168.189.127' failed: System Error: No route to host.
[root@bogon home]# ls /mnt/
hgfs
[root@bogon home]# vi /etc/exports //配置NFS的export文件,home为共享目录
[root@bogon home]# vi /etc/exports
[root@bogon home]# /etc/init.d/nfs start
启动 NFS 服务: [确定]
关掉 NFS 配额: [确定]
启动 NFS 守护进程: [失败] //这里提示NFS启动不成功,后面也能把本机的home目录挂载到本机mnt目录下,神奇!!
[root@bogon home]# vi /etc/exports
[root@bogon home]# mount -t nfs 192.168.189.128:/home /mnt
[root@bogon home]# ls /mnt //挂载后,直接在mnt目录下查看home目录的内容
Denny noodle test2 workdir.tar.gz
hello.c smb tftp-0.42-3.1.i386.rpm xinetd-2.3.14-10.el5.i386.rpm
home smb.conf tftp-server-0.42-3.1.i386.rpm
[root@bogon home]# umount /mnt
[root@bogon home]# ls /mnt
hgfs
[root@bogon home]#
Fuck!!这都行,到底今天中了什么邪~~
