Centos7 完美解決 mount異常:refused mount request from xxx unmatched host!

前言

      由於需求需要掛載另外一臺主機節點,中間花費了一點時間,所以記錄一下,供大家參考。

1. 錯誤如下,提示沒有訪問權限,此時需要去添加IP信任:

    mount.nfs: access denied by server while mounting xxx:/home

   1.1  被掛載主機日誌,提示無法匹配host,這裏也提示需要添加IP訪問信任:   
     May 19 17:01:44 mgmt rpc.mountd[85558]: refused mount request from xxx for /home (/home): unmatched host
     May 19 17:02:58 mgmt rpc.mountd[85558]: refused mount request from xxx for /home (/home): unmatched host
     May 19 17:05:29 mgmt rpc.mountd[85558]: refused mount request from xxx for /home (/home): unmatched host
     May 19 17:07:45 mgmt rpc.mountd[85558]: refused mount request from xxx for /home (/home): unmatched host

2.解決辦法

   2.1 添加掛載目錄信任,

        vi /etc/exports ,如下:

       /home *(rw,no_root_squash,no_all_squash,insecure) (根據自己的掛載的目錄,替換/home即可)

   2.2 重新啓動,並加載 nfs

       systemctl restart nfs 

       systemctl reload 

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