在 ECS 上,NFS 高速缓存需要大约 20 分钟来传播和刷新 ECS 应用装置上 dataheadsvc 服务中的 NFS 缓存。在设置新的 NFS 导出时,通常会发生此问题,因为需要进行一些更改才能解决导出自定义。
修改现有 NFS 导出并且导出在 ECS 上显示为活动时,预计会在 ECS 上出现此行为。
- 要验证此问题,请检查 ECS 上的导出:
命令:(在 NFS Linux 客户端上)
# showmount -e <ECS>的 IP 地址示例:
[root@nfsclient ~]# showmount -e xxx.xxx.xxx
Export list for xxx.xxx.xxx.xxx:
/namespace/nfsbucket *
- 尝试装载已在 ECS 上验证的导出:
命令:(提醒:这是一个示例命令,我们将添加 -vv 选项,以在 NFS Linux 客户端上获得更详细的输出。
# mount -vv -t nfs -o vers=3,,nolock,sec=sys,proto=tcp <ECS IP>:<导出路径><本地装载点>
示例:
[root@ nfsclient ~]# mount -vv -t nfs -o vers=3,,nolock,sec=sys,proto=tcp xxx.xxx.xxx.xxx:/namespace/nfsbucket /mnt/test
mount.nfs: timeout set for Wed Aug 14 09:37:03 2019
mount.nfs: trying text-based options 'vers=3,nolock,sec=sys,proto=tcp,addr= xxx.xxx.xxx.xxx '
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying xxx.xxx.xxx.xxx prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=6
mount.nfs: trying xxx.xxx.xxx.xxx prog 100005 vers 3 prot TCP port 2049
mount.nfs: mount(2): No such file or directory
mount.nfs: mounting xxx.xxx.xxx.xxx:/namespace/nfsbucket failed, reason given by server: No such file or directory
- 在 ECS 上验证导出无法找到:
命令:(请注意,这将同时扫描 ECS 群集上的关键字 nfs 的所有节点日志)
# svc_log -i -f nfs -sr all -sn -sf -n all -start '5 minutes ago'
例子:
admin@ecsnode1:~> svc_log -i -f nfs -sr all -sn -sf -n all -start '5 minutes ago'
svc_log v0.9.19 (svc_tools v1.1.1) Started 2019-08-14 15:35:57
Running on nodes: <All nodes>
Time range: 2019-08-14 15:30:57 - 2019-08-14 15:35:57
Filter string(s): 'nfs'
Show filename(s): True
Show nodename(s): True
Search reclaim logs (if any): False
Case insensitive: True
169.254.1.1 dataheadsvc.log 2019-08-14T15:35:05,953 [RpcDispatcherMD-3082827] INFO RpcProgramMountd.java (line 101) MOUNT MNT path: /namespace/nfsbucket Client: /xxx.xxx.xxx
169.254.1.1 dataheadsvc.log 2019-08-14T15:35:05,958 [RpcDispatcherMD-3082827] INFO ExportsService.java (line 98) added key /namespace/nfsbucket/ to the cache
169.254.1.1 dataheadsvc.log 2019-08-14T15:35:05,960 [RpcDispatcherMD-3082827] ERROR RpcProgramMountd.java (line 111) Couldn't locate the exportEntry for the path /namespace/nfsbucket
- 等待大约 20 分钟,以便在 ECS 上刷新冲突的导出设置,然后重试装载命令:
命令:(提醒:这是一个示例命令,我们将添加 -vv 选项,以在 NFS Linux 客户端上获得更详细的输出。
# mount -vv -t nfs -o vers=3,,nolock,sec=sys,proto=tcp <ECS IP>:<导出路径><本地装载点>
示例:
[root@client ~]# mount -vv -t nfs -o vers=3,,nolock,sec=sys,proto=tcp xxx.xxx.xxx: /namespace/nfsbucket mnt/test
final mount options: 'vers=3,,nolock,sec=sys,proto=tcp'
mount.nfs: timeout set for Wed Aug 14 13:55:00 2019
mount.nfs: trying text-based options 'vers=3,nolock,sec=sys,proto=tcp,addr= xxx.xxx.xxx '
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying xxx.xxx.xxx prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=6
mount.nfs: trying xxx.xxx.xxx prog 100005 vers 3 prot TCP port 2049
xxx.xxx.xxx:/namespace/nfsbucket on /mnt/test type nfs (rw,vers=3,,nolock,sec=sys,proto=tcp)