Centos7

NFSv4 在掛載時掛起

  • September 4, 2018

NFS 掛載命令在伺服器重新啟動後無限期地掛在客戶端上。

我正在執行這個命令:mount -t nfs -v 10.17.25.27:/DATA/projects/assets-db/log-apache test

我的 NFS 伺服器是 : 10.17.25.27,客戶端 IP 是10.17.25.152

我為 nfs 啟用了 syslog 調試,我看到了這些錯誤:

Aug 31 16:26:06 SEFRAPP05155 kernel: NFS call  setclientid_confirm auth=UNIX, (client ID 9ee5cc5a6d8c0000)
Aug 31 16:26:06 SEFRAPP05155 kernel: NFS reply setclientid_confirm: -10008
Aug 31 16:26:06 SEFRAPP05155 kernel: NFS call  setclientid auth=UNIX, 'Linux NFSv4.0 10.17.25.152/10.17.25.27 tcp'
Aug 31 16:26:06 SEFRAPP05155 kernel: NFS reply setclientid: 0
Aug 31 16:26:06 SEFRAPP05155 kernel: NFS call  setclientid_confirm auth=UNIX, (client ID 9ee5cc5a6e8c0000)
Aug 31 16:26:06 SEFRAPP05155 kernel: NFS reply setclientid_confirm: -10008
Aug 31 16:26:06 SEFRAPP05155 kernel: --> nfs_put_client({8})
Aug 31 16:26:06 SEFRAPP05155 kernel: NFS: <-- nfs40_walk_client_list status = -10008
Aug 31 16:26:06 SEFRAPP05155 kernel: --> nfs4_create_server()
Aug 31 16:26:06 SEFRAPP05155 kernel: --> nfs4_init_server()
Aug 31 16:26:06 SEFRAPP05155 kernel: --> nfs4_set_client()
Aug 31 16:26:06 SEFRAPP05155 kernel: --> nfs_get_client(10.17.25.27,v4)
Aug 31 16:26:06 SEFRAPP05155 kernel: <-- nfs_found_client found nfs_client ffff8801e93a0400 for 10.17.25.27
Aug 31 16:26:06 SEFRAPP05155 kernel: <-- nfs4_set_client() = 0 [new ffff8801e93a0400]
Aug 31 16:26:06 SEFRAPP05155 kernel: <-- nfs4_init_server() = 0
Aug 31 16:26:06 SEFRAPP05155 kernel: --> nfs4_get_rootfh()
...
Aug 31 16:26:08 SEFRAPP05155 kernel: NFS call  setclientid_confirm auth=UNIX, (client ID 9ee5cc5a6f8c0000)
Aug 31 16:26:08 SEFRAPP05155 kernel: NFS reply setclientid_confirm: -10008
Aug 31 16:26:08 SEFRAPP05155 kernel: NFS call  setclientid auth=UNIX, 'Linux NFSv4.0 10.17.25.152/10.17.25.27 tcp'
Aug 31 16:26:08 SEFRAPP05155 kernel: NFS reply setclientid: 0
Aug 31 16:26:08 SEFRAPP05155 kernel: NFS call  setclientid_confirm auth=UNIX, (client ID 9ee5cc5a708c0000)
Aug 31 16:26:08 SEFRAPP05155 kernel: NFS reply setclientid_confirm: -10008
Aug 31 16:26:08 SEFRAPP05155 kernel: --> nfs_put_client({9})
Aug 31 16:26:08 SEFRAPP05155 kernel: NFS: <-- nfs40_walk_client_list status = -10008
Aug 31 16:26:08 SEFRAPP05155 kernel: nfs4_get_rootfh: getroot error = 512
Aug 31 16:26:08 SEFRAPP05155 kernel: <-- nfs4_get_rootfh() = -512
Aug 31 16:26:08 SEFRAPP05155 kernel: --> nfs_free_server()
Aug 31 16:26:08 SEFRAPP05155 kernel: --> nfs_put_client({8})
Aug 31 16:26:08 SEFRAPP05155 kernel: <-- nfs_free_server()
Aug 31 16:26:08 SEFRAPP05155 kernel: <-- nfs4_create_server() = error -512
...
Aug 31 16:26:08 SEFRAPP05155 kernel: NFS call  setclientid_confirm auth=UNIX, (client ID 9ee5cc5a6f8c0000)
Aug 31 16:26:08 SEFRAPP05155 kernel: NFS reply setclientid_confirm: -10008
Aug 31 16:26:08 SEFRAPP05155 kernel: NFS call  setclientid auth=UNIX, 'Linux NFSv4.0 10.17.25.152/10.17.25.27 tcp'
Aug 31 16:26:08 SEFRAPP05155 kernel: NFS reply setclientid: 0
Aug 31 16:26:08 SEFRAPP05155 kernel: NFS call  setclientid_confirm auth=UNIX, (client ID 9ee5cc5a708c0000)
Aug 31 16:26:08 SEFRAPP05155 kernel: NFS reply setclientid_confirm: -10008
Aug 31 16:26:08 SEFRAPP05155 kernel: --> nfs_put_client({9})
Aug 31 16:26:08 SEFRAPP05155 kernel: NFS: <-- nfs40_walk_client_list status = -10008
Aug 31 16:26:08 SEFRAPP05155 kernel: nfs4_get_rootfh: getroot error = 512
Aug 31 16:26:08 SEFRAPP05155 kernel: <-- nfs4_get_rootfh() = -512
Aug 31 16:26:08 SEFRAPP05155 kernel: --> nfs_free_server()
Aug 31 16:26:08 SEFRAPP05155 kernel: --> nfs_put_client({8})
Aug 31 16:26:08 SEFRAPP05155 kernel: <-- nfs_free_server()
Aug 31 16:26:08 SEFRAPP05155 kernel: <-- nfs4_create_server() = error -512
Aug 31 16:26:09 SEFRAPP05155 kernel: NFS call  setclientid_confirm auth=UNIX, (client ID 9ee5cc5a708c0000)
Aug 31 16:26:09 SEFRAPP05155 kernel: NFS reply setclientid_confirm: -10008
Aug 31 16:26:09 SEFRAPP05155 kernel: NFS call  setclientid auth=UNIX, 'Linux NFSv4.0 10.17.25.152/10.17.25.27 tcp'
Aug 31 16:26:09 SEFRAPP05155 kernel: NFS reply setclientid: 0
Aug 31 16:26:09 SEFRAPP05155 kernel: NFS call  setclientid_confirm auth=UNIX, (client ID 9ee5cc5a718c0000)
Aug 31 16:26:09 SEFRAPP05155 kernel: NFS reply setclientid_confirm: -10008
Aug 31 16:26:09 SEFRAPP05155 kernel: --> nfs_put_client({8})
Aug 31 16:26:09 SEFRAPP05155 kernel: NFS: <-- nfs40_walk_client_list status = -10008

我看到重複這些類型的日誌行。

當我rpcinfo -p 10.17.25.27在客戶端上執行時,我看到:

  program vers proto   port  service
   100000    4   tcp    111  portmapper
   100000    3   tcp    111  portmapper
   100000    2   tcp    111  portmapper
   100000    4   udp    111  portmapper
   100000    3   udp    111  portmapper
   100000    2   udp    111  portmapper
   100024    1   udp    662  status
   100005    1   udp    892  mountd
   100024    1   tcp    662  status
   100005    1   tcp    892  mountd
   100005    2   udp    892  mountd
   100005    2   tcp    892  mountd
   100005    3   udp    892  mountd
   100005    3   tcp    892  mountd
   100003    3   tcp   2049  nfs
   100003    4   tcp   2049  nfs
   100227    3   tcp   2049  nfs_acl
   100003    3   udp   2049  nfs
   100003    4   udp   2049  nfs
   100227    3   udp   2049  nfs_acl
   100021    1   udp  32768  nlockmgr
   100021    3   udp  32768  nlockmgr
   100021    4   udp  32768  nlockmgr
   100021    1   tcp  32768  nlockmgr
   100021    3   tcp  32768  nlockmgr
   100021    4   tcp  32768  nlockmgr

請注意,使用 NFS 版本 3 進行安裝可以正常工作,但我需要版本 4 中的功能,因此我無法降級到此舊版本的協議。

我正在CentOS 7.2使用核心3.10.0-514.26.2.el7.x86_64

我們沒有找到為什麼我們的 NFS 突然停機,並且在重新啟動後,客戶端無法掛載任何導出的文件系統。我們試圖重新啟動所有伺服器,打開機器之間的所有埠,但沒有成功。

但是,在我們將核心從版本升級3.10.0-514.26.2.el7.x86_643.10.0-862.11.6.el7.x86_64

引用自:https://serverfault.com/questions/928886