CentOS下nfs的一些錯誤排查方法

來源:互聯網
上載者:User

CentOS下nfs的一些錯誤排查方法

一、NFS服務常見故障排查:

  NFS服務出現了故障,主要從以下幾個方面檢查原因:

  (1)檢查NFS客戶機和伺服器的負荷是否太高,Server和Client之間的網路是否正常;

  (2)檢查/etc/exports檔案的正確性;

  (3)必要時重啟NFS和portmap服務;

  (4)運行下列命令重新啟動portmap和NFS:

  # /etc/init.d/portmap restart

  # /etc/init.d/nfs restart

  # /etc/init.d/rpcbind restart (在RHEL/CentOS 6.x裡面)

  # chkconfig portmap on

  # chkconfig nfs on

  # chkconfig rpcbind on (在RHEL/CentOS 6.x裡面)

  注意:在RHEL/CentOS 6.x裡面,portmap服務改名為rpcbind服務了;順便說一下,rpcbind服務也是圖形介面的關鍵基礎服務,不啟動此服務,不能啟動圖形案頭。

  (5) 檢查Client上的mount命令或/etc/fstab的文法是否正確;

  (6) 查看核心是否支援NFS和RPC服務。一般正常安裝的Linux系統都會預設支援NFS和RPC服務,除非你自己重新編譯的核心,而且沒選擇nfs支援選項編譯。

  二、NFS常見故障解決方案:

  1、The rpcbind failure error

  故障現象:

  nfs mount: server1:: RPC: Rpcbind failure

  RPC: Timed Out

  nfs mount: retrying: /mntpoint

  原因:

  第一,可能因為客戶機的hosts檔案中存在錯誤的ip地址、主機名稱或節點名組合;

  第二,伺服器因為過載而暫時停止服務。

  2、The server not responding error

  現象:

  NFS server server2 not responding, still trying

  原因:

  第一,網路不通,用ping命令檢測一下。

  第二,伺服器關機。

  3、The NFS client fails a reboot error

  現象:

  啟動客戶機後停住了,不斷顯示如下提示資訊:

  Setting default interface for multicast: add net 224.0.0.0: gateway:

  client_node_name.

  原因:

  在etc/vfstab的mount選項中使用了fg而又無法成功mount伺服器上的資源,改成bg或將該行注釋掉,直到伺服器可用為止。

  4、The service not responding error

  現象:

  nfs mount: dbserver: NFS: Service not responding

  nfs mount: retrying: /mntpoint

  原因:

  第一,當前層級不是層級3,用who -r查看,用init 3切換。

  第二,NFS Server守護進程不存在,用ps -ef | grep nfs檢查,用/etc/init.d/nfs start啟動。

  5、The program not registered error

  現象:

  nfs mount: dbserver: RPC: Program not registered

  nfs mount: retrying: /mntpoint

  原因:

  第一,當前層級不是層級3。

  第二,mountd守護進程沒有啟動,用/etc/init.d/nfs指令碼啟動NFS守護進程。

  第三,看/etc/dfs/dfstab中的條目是否正常。

  6、The stale file handle error

  現象:

  stale NFS file handle

  原因:

  伺服器上的共用資源移動位置了,在用戶端使用umount和mount重新掛接就可以了。

  7、The unknown host error

  現象:

  nfs mount: sserver1:: RPC: Unknown host

  原因:

  hosts檔案中的內容不正確。

  8、The mount point error

  現象:

  mount: mount-point /DS9 does not exist.

  原因:

  該掛接點在客戶機上不存在,注意檢查命令列或/etc/vfstab檔案中相關條目的拼字。

  9、The no such file error

  現象:

  No such file or directory.

  原因:

  該掛接點在伺服器上不存在,注意檢查命令列或/etc/vfstab檔案中相關條目的拼字。

  10、No route to host

  錯誤現象:

  # mount 10.10.11.211:/opt/data/xmldb /c2c-web1/data/xmldb -t nfs -o rw

  mount: mount to NFS server ’10.10.11.211′ failed: System Error: No route to host.

  原因:

  防火牆被開啟,關閉防火牆。

  這個原因很多人都忽視了,如果開啟了防火牆(包括iptables和硬體防火牆),NFS預設使用111連接埠,我們先要檢測是否開啟了這個連接埠,還要檢查TCP_Wrappers的設定。

  11、Not owner

  現象:

  # mount -F nfs -o rw 10.10.2.3:/mnt/c2c/data/resinfo2 /data/data/resinfo2

  nfs mount: mount: /data/data/resinfo2: Not owner

  原因:

  這是Solaris 10版本掛載較低版本nfs時報的錯誤。

  解決:

  需要用-o vers=3參數

  樣本:

  # mount -F nfs -o vers=3 10.10.2.3:/mnt/c2c/data/resinfo2 /data/data/resinfo2

  12、RPC: Program not registered & retrying

  現象:

  nfs mount: 10.10.2.3: : RPC: Program not registered

  nfs mount: retrying: /data/data/resinfo2

  原因:

  沒有啟動NFS共用端服務。

  解決:需要重新啟動share端的NFS服務,

  Linux:

  mount: RPC: Program not registered

  # /etc/init.d/nfs restart

  Solaris:

  mount: RPC: Program not registered

  # /etc/rc.d/init.d/nfs restart

  13、can’t contact portmapper: RPC: Remote system error – Connection refused

  現象:

  # exportfs -a

  can’t contact portmapper: RPC: Remote system error – Connection refused

  原因:

  出現這個錯誤資訊是由於server端的portmap沒有啟動。

  解決:

  # /etc/init.d/portmap start

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.