nfs 服務器

轉載至原作者
1.創建共享目錄
#mkdir /home/hellolinux/nfs
2.創建或修改/etc/exports文件
#vi /etc/exports
home/hellolinux/nfs 192.168.0.*(rw,sync,no_root_squash)
3.NFS服務的啓動與停止
#service nfs start
#service nfs stop
#service nfs restart
#servcie nfs status(服務狀態)
4 在客戶機上查看NFS的資源共享情況
# showmount -e 192.168.0.1
Export list for 192.168.0.1:
/home/hellolinux/nfs 192.168.0.*
5 .使用mount命令掛栽共享資源
mount -t nfs -o nolock 192.168.0.1:/home/hellolinux/nfs /mnt/nfs
出現的問題與解決方法:
[root@FORLINX6410]# mount -t nfs 192.168.0.1:/home/hellolinux/rootfs /mnt/nfs
svc: failed to register lockdv1 RPC service (errno 111).
mount: mounting 192.168.0.1:/home/hellolinux/rootfs on /mnt/nfs failed: Connection refused
解決方案:
nfs mount 默認選項包括文件鎖,依賴於portmap提供的動態端口分配功能。
解決方法:kill 文件鎖(lockd)或者mount -o nolock

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章