跳转到主内容

锁定如何在集群 ONTAP 中工作以及如何手动中断锁定

Views:
94
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
nas
Last Updated:

执行

执行

适用场景

  • ONTAP 9
  • NFS
  • SMB/CIFS

问题描述

  • 本文讨论两种锁定类型
正常锁定 停止其他客户端计算机在现有的情况下访问文件 客户端正在访问它
机会锁 (Oplock) 允许共享文件和客户端的读取访问权限 对锁定信息进行侧面缓存
  • 第一个, 无法 删除锁定。它们不受文件管理器上的 Oplocks 设置的控制。它们旨在确保在读取或写入文件时,其他客户端计算机不会对文件进行任何更改。
  • 第二种 方法是使用 Oplock ,允许客户端计算机同时访问同一文件,以便进行只读访问。当一个客户端需要对文件执行写入操作时,必须解除锁定以实现独占写入锁定,这样才能将部分或全部文件缓存到客户端计算机以进行编辑。
  • 由于 Oplocks 的性质,因此必须开发一种机制,以便通过用户交互手动或根据文件管理器的规则自动将其中断。

机会锁的一般流动如下:

  1. 此时,客户端 1 将打开 \\storage_system\share\file1 ,请求批处理或独占机会锁
  2. 存储系统对文件 1 的批处理或排它的 Oplock 进行响应到 Client1
  3. 客户端 2 尝试打开 \\storage_system\share\file1,请求批处理或独占机会锁
  4. 存储系统暂停向客户端 2 发出的打开请求,并向客户端 1 发送 Oplock 中断请求,请求其刷新 / 提交更改并释放其锁定。
  5. 客户端 1 响应 Oplock 中断请求,刷新 / 提交其缓存写入
  6. 存储系统将“ Open (打开)”权限授予客户端 2 、并带有相应的锁定
在上述示例中,在步骤 4 中,当存储系统向客户端 1 发送 Oplock 中断请求时,将启动 35 秒计时器。如果 Client 1 在 35 秒内未响应 Oplock 中断请求、则存储系统会执行三项操作:
  1. 在 Data ONTAP 9.0 日志之前,是一条机会锁延迟中断消息,其中包含故障客户端的 IP 地址到系统日志
  2. 强制清除文件上与关联的任何锁定 客户端 1.
  3. 授予客户端 2 开放响应

 由于机会锁延迟中断指示客户端出现问题,因此故障排除工作应集中在客户端上。

客户机不响应 Oplock 中断请求的原因有三个:

  • 客户端重新启动异常(例如蓝屏),因此不再认为它锁定了文件。
  • 客户端与存储系统的打开连接过多,因此无法响应 Oplock 中断请求。
  • 客户端和存储系统之间存在网络连接问题,妨碍客户端接收 Oplock 中断请求。

 

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

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.
Scan to view the article on your device