加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – NFS – 客户端上的文件未出现在服务器上

发布时间:2020-12-13 17:16:08 所属栏目:Linux 来源:网络整理
导读:继承我的设置:一台NFS服务器机器,两台NFS客户端机器. 客户端计算机将文件写入NFS挂载,但偶尔,这些文件不会出现在NFS服务器计算机或其他客户端计算机上….. 我对这一点感到非常难过……任何帮助都将不胜感激! 解决方法 不要立即出现或不出现一段时间? 默认
继承我的设置:一台NFS服务器机器,两台NFS客户端机器.

客户端计算机将文件写入NFS挂载,但偶尔,这些文件不会出现在NFS服务器计算机或其他客户端计算机上…..

我对这一点感到非常难过……任何帮助都将不胜感激!

解决方法

不要立即出现或不出现一段时间?

默认情况下,NFS会在系统内核级别执行目录和文件内容的缓存级别.如果机器1更新文件并且机器2仍然在缓存中获得该文件的副本,则如果机器2尝试访问该文件,则在其缓存到期之前它可能看不到该文件的较新版本.

检查nfs的手册页以获取以下参数:

acregmin=n     The minimum time in seconds that attributes of a  regu-
                  lar  file  should  be  cached  before  requesting fresh
                  information from a server.  The default is 3 seconds.

   acregmax=n     The maximum time in seconds that attributes of a  regu-
                  lar file can be cached before requesting fresh informa-
                  tion from a server.  The default is 60 seconds.

   acdirmin=n     The minimum time in seconds that attributes of a direc-
                  tory  should be cached before requesting fresh informa-
                  tion from a server.  The default is 30 seconds.

   acdirmax=n     The maximum time in seconds that attributes of a direc-
                  tory  can be cached before requesting fresh information
                  from a server.  The default is 60 seconds.

   actimeo=n      Using actimeo sets all of acregmin,acregmax,acdirmin,and  acdirmax  to  the same value.  There is no default
                  value.

   noac           Disable all forms of attribute caching entirely.   This
                  extracts  a  significant  performance  penalty  but  it
                  allows two different  NFS  clients  to  get  reasonable
                  results  when  both  clients  are actively writing to a
                  common export on the server.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读