メインコンテンツまでスキップ

MacOSクライアントが空のフォルダを削除できないのはなぜですか?

Views:
542
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クライアントとは異なります
  • この動作により、共有違反が発生し、クライアントがフォルダを削除できなくなる可能性があります。

例:

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が読み取りアクセス用にファイルを開き、読み取り、書き込み、削除用に共有します。(このパケットトレース内でファイルが閉じられることはありません)。
  • フレーム44599:クライアントBが削除アクセス用のファイルを開き、共有なし(ファイルへの排他的アクセス)
  • フレーム44600:クライアントBがSTATUS_SHARING_VIOLATIONを受信します

追加情報

次のような回避策が考えられます。

  1. 同じ共有上に「削除対象」フォルダを作成します
  2. 空のディレクトリを"To-Be-Deleted"に移動し、一意の名前を付けます(例:クライアントのホスト名と日付に基づいて)。
  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.