【轉】NFS服務配置與mount nfs時-o nolock的問題


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

 

相關解答鏈接:

1.http://bbs.chinaunix.net/thread-2001083-1-1.html

2.http://blog.csdn.net/alex_xhl/article/details/7222602

 

來源


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM