メインコンテンツへスキップ

fcntlまたはLockFileExを使用してONTAPファイルシステムに排他ロックが実装されていますか?

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

環境

ONTAP 9

回答

  • いいえ、ONTAPファイルシステムはfcntlLockFileExを使用したファイルシステムレベルでの排他ロックは提供されません。
  • NFSv3アクセスの場合、ファイルロックはNetwork Lock Manager(NLM)で管理されます。 
    • NLMはアドバイザリ ロックのみを提供します。
    • アドバイザリ ロックでは、クライアント アプリケーションがロックをチェックして尊重する必要があります。
    • アプリケーションがロックをチェックしないと、クライアントはロックされたファイルまたは領域にアクセスできます。
  • NFSv4.xでは、共有予約ロックメカニズムによる強制ロックがサポートされます。 
    • 共有予約ロックはプロトコルレベルで適用されます。
    • 共有予約ロックでファイルをロックすると、ロックの種類によって他のクライアントからのアクセスが遮断されます。
    • NFSv4の強制ロックの詳細については、How is Mandatory Locking supported for NFSv4 on ONTAP 9を参照してください。
  • fcntl UNIX/Linux では、POSIX アドバイザリバイト範囲(レコード)ロックを使用します。 
    • NFSv4.xでは、カーネルは fcntlロックをNFSv4のロック処理にマッピングします。
    • NFSv4共有予約ロックはfcntlロックとは異なり、OPEN処理の一部であり、ファイルオープンモード(share_accessおよびshare_deny)を制御します。
    • POSIXはfcntlを介して共有拒否セマンティクスを公開しません。
    • ほとんどのUNIX/Linux NFSv4クライアントは、デフォルトでshare_deny-noneを使用します。
  • Windowsクライアントの場合、LockFileEx はCIFS/SMB経由のアドバイザリロックに使用されます。 

ロックの適用は、アプリケーションとプロトコルの動作によって異なります。

  • NFSv3では、強制ロックはサポートされていません。
  • NFSv4.xでは共有予約ロックによる強制ロックがサポートされていますが、POSIX API(fcntl)には共有拒否のセマンティクスを要求する方法がありません

追加情報

追加情報
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.