用mount掛載遠程服務器網絡硬盤

環境:

服務器:192.168.20.204

客戶端:192.168.20.203

1. 在服務器配置/etc/export  添加可以共享的文件夾和允許的客戶端地址

/home/dir 192.168.20.203(rw,no_root_squash,async)

要加上no_root_squash,async,不然會出現reason given by server: Permission denied

重啓nfs服務器

service nfs restart

2. 在客戶端運行

mkdir -p /mnt/dir    創建掛載點

mount -t nfs 192.168.20.204:/home/dir /home/dir

一定要先創建掛載點,不然會出現mount point does not exist的錯誤

3. RPC Error: Program not registered錯誤

服務沒啓動。。

運行service nfs restart

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