開發板mount掛載到紅帽6.5方法及問題解決

1.創建共享目錄

#mkdir /arm


2.創建或修改/etc/exports文件
#vim /etc/exprots

/arm *(rw) //*代表所有主機


3.nfs服務的啓動與停止
#service nfs start
#service nfs stop
#service nfs restart

#service nfs status(服務狀態)


4.在客戶機上查看nfs的資源共享情況

我的主機IP爲192.168.1.20

#showmount -e 192.168.1.20
Exprot list for 192.168.1.20
/arm *
5.使用mount命令掛載共享資源

mount -t nfs -o nolock 192.168.1.20:/arm /mnt

6.開機自動掛載

打開配置文件

vim /root/.bash_profile

將語句mount -t nfs -o nolock 192.168.1.20:/arm /mnt添加至文件尾即可


出現的問題與解決方法:
[root@FriendlyARM /]# mount -t nfs 192.168.1.20:/arm /mnt/                      
[  442.150000] svc: failed to register lockdv1 RPC service (errno 111).         
[  442.150000] lockd_up: makesock failed, error=-111                            
mount: mounting 192.168.1.20:/arm on /mnt/ failed: Connection refused
解決方案:
nfs mount 默認選項包括文件鎖,依賴於protmap提供的動態端口分配功能
解決方法:kill 文件鎖(lockd)  或者 mount -o nolock
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章