NFS

 

一。安装

     1。Nfs-uliet

     2。portmap

     3。Rpc

二。启动

Service portmap start

Chkconfig portmap on

Rpcinfo –p localhost

Service nfs start

配置前一定要查看rpc是否running

 

三。Share

  Vi /etc/export/home 192.168.60.0/24(rw,sync。。。。)

  Exportfs –rv

四。测试

      Showmount –e local

      hostmount -t nfs 192.168.1.2:/var/ftp/pub /mnt/cdromumount /mnt/cdrom

 注意:1./etc/exports里的参数

           2.共享目录的权限,客户机可以mount但是没有权限打开

 

五。umount强制卸载无法访问(unreachable)的nfs

      一、查询本系统上已经mount的所有文件系统

[[email]root@f5ha.com[/email] ~]# cat /proc/mounts

rootfs / rootfs rw 0 0

/dev/root / ext3 rw,data=ordered 0 0

/dev /dev tmpfs rw 0 0

/proc /proc proc rw 0 0

/sys /sys sysfs rw 0 0

/proc/bus/usb /proc/bus/usb usbfs rw 0 0

devpts /dev/pts devpts rw 0 0

/dev/vda1 /boot ext3 rw,data=ordered 0 0

tmpfs /dev/shm tmpfs rw 0 0

none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0

sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0

/etc/auto.misc /misc autofs rw,fd=7,pgrp=2229,timeout=300,minproto=5,maxproto=5,indirect 0 0

-hosts /net autofs rw,fd=13,pgrp=2229,timeout=300,minproto=5,maxproto=5,indirect 0 0

192.168.0.10:/bak /bak nfs rw,vers=3,rsize=32768,wsize=32768,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=192.168.0.10 0 0

192.168.0.10:/web /web nfs rw,vers=3,rsize=32768,wsize=32768,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=192.168.0.10 0 0



二、强制卸载无法访问(unreachable)的nfs



[[email]root@f5ha.com[/email] ~]# umount -f /web # Force unmount用来强制卸载网络断开无法访问unreachable的nfs文件系统



[[email]root@f5ha.com[/email] ~]# umount -l /isodevices # Lazy unmount卸载硬盘安装系统时的iso系统文件

 

 

 

 

 


 

 

 

posted on 2009-07-12 11:01  晓风残梦  阅读(332)  评论(0编辑  收藏  举报

导航