跳转到主内容

ONTAP 9 上的 NFSv4 如何支持强制锁定?

Views:
21
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
nfs
Last Updated:

适用场景

  • ONTAP 9
  • NFSv4

问题解答

  • 随着 NFSv4 的推出, NFS 协议现在支持强制锁定,网络锁定管理器( NLM )不再用于锁定。
    • NFSv4 支持两种文件锁定方法:
      • 字节范围锁定
      • 共享预留锁定
         
    • 字节范围锁定始终是建议锁定。
      • ONTAP 9 不会对 NFS 强制执行强制字节范围锁定。所有字节范围锁定都是建议性的,并且仅会阻止授予冲突锁定请求,并且不会对读取或写入操作产生任何影响。
         
    • 共享预留锁定始终为强制锁定。
      • 共享预留锁定存在于整个文件上。它们是在打开期间采集的,用于读取,写入和 SETATTR 访问检查。关闭用于回收共享预留锁定和回收资源。
         

追加信息

  • 强制共享预留锁定示例

Mandatory.png

  • 在数据包 38 中,客户端打开文件并将 share_deny 设置为拒绝写入请求
  • 当发生冲突的写入请求在数据包 44 中使用不同的状态 ID (全部为零)时,它会收到 NFS4ERR_LOCKED 。
  • 有关详细信息,请参见 RFC 5661

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.