跳转到主内容

为什么MacOS客户端可能无法删除空文件夹?

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

适用场景

  • ONTAP 9
  • CIFS
  • macOS 10.14
  • macOS 10.15.

问题解答

  • 从SMBv2开始、当删除文件或文件夹时 delete on close 、会在该文件夹上设置一个、随后关闭该文件夹时、该文件夹将从文件系统中删除
  • MacOS CIFS客户端的行为与Windows客户端不同、Windows客户端在打开以删除时需要以独占方式访问某个文件夹
  • 此行为可能会导致共享违规、从而阻止客户端删除此文件夹。

示例:

18557   2020-01-30 15:46:09.003908   172.18.24.33   172.18.20.90   SMB2   Create Request File: ...\Folder1\TestFolder

18558   2020-01-30 15:46:09.004297   172.18.20.90   172.18.24.33   SMB2   Create Response File: ...\Folder1\TestFolder

44599   2020-01-30 15:46:24.759237   172.18.24.49   172.18.20.90   SMB2   Create Request File: ...\Folder1\TestFolder;SetInfo Request FILE_INFO/SMB2_FILE_DISPOSITION_INFO;Close Request

44600   2020-01-30 15:46:24.759696   172.18.20.90   172.18.24.49   SMB2   Create Response, Error: STATUS_SHARING_VIOLATION;SetInfo Response, Error: STATUS_SHARING_VIOLATION;Close Response, Error: STATUS_SHARING_VIOLATION

  • 帧18557:客户端A打开文件以进行读取访问、并共享以进行读取、写入、删除。(此数据包跟踪不会关闭此文件。)
  • Frame 74599:Client B (客户端B)打开文件以进行删除访问、共享none (对文件的独占访问)
  • 帧44600:客户端B收到STATUS _共享_违规

追加信息

可能的临时解决策包括:

  1. 在同一共享上创建一个"待删除"文件夹
  2. 将空目录移至"待删除"并为其指定唯一名称(例如、基于客户端的主机名和日期)
  3. 尝试删除空目录
  4. 如果删除失败、则需要稍后 进行清理

备注:步骤2中的唯一名称可确保将来在同一目录名称上成功重命名。

 

 

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.