Skip to main content
NetApp Knowledge Base

What are stateid, in-use owners, free owners, client count, and lease count in NFSv4 implementation of NetApp shared storage?

Last Updated:

Applies to 

Data ONTAP 7


Network File System (NFS) version 4 (RFC3530), unlike earlier versions of NFS, is a stateful protocol. The new protocol integrates file locking, strong security, operation coalescing, and delegation capabilities to enhance client performance for narrow data sharing applications on high-bandwidth networks. The lease-based locking support adds significant state (and associated error recovery complexity) to the NFS Version 4 protocol. Now all the OPENs and LOCKs are tracked by the storage system.


In NFSv4, every stateful operation consumes a structure called stateid. A stateid is a unique 64-bit object that defines the locking state of a specific file. When a client requests a lock, it presents a clientid and a unique-per-client lock owner identification to identify the lock owner. A lock owner is the thread id, process id or another unique identifier for the application owning a particular lock on a client. On granting the lock, the server returns a unique 64-bit object, the stateid, to be used by the client in subsequent operations as a shorthand notation to the lock owner information now stored on the server.

This not only prevents another client from accessing a file in a manner that conflicts with the locks that are held. It also prevents unwanted replay by a broken router of I/O requests with a previous stateid (which can corrupt the locking state). A side effect of the stateid is that it also provides a positive acknowledgement to the server, stating that all locks held by the client are still valid, allowing an active client to avoid explicit lease refresh.

Stateid count is the maximum number of NFSv4 Open/Lock/Delegation structures.

In-use Owners

Owner is a thread id, process id, or another unique identifier for the application owning a particular lock on a client.

Every lock request has to send an owner id. There is a structure called in-use owner. For example, in the following lock status -v command, the number of owner structures that the storage system has stored can be seen.

filerA> priv set diag
Warning: These diagnostic commands are for use by NetApp
         personnel only.
filer*>lock status -v
Last Op Info:  Seq: 1  Type: 116  Stateid: 0x10000 Err: 0x0
Free owners 7130; In-Use Owners 1062
Client Id 0x4d3e88320001001d (NFS V4)
Id String:
Verifier: 0xf4bd1fc96b3f4d  Queue: Leasing
Lease Start: 1296099100 
Lease State: Normal;
Lease Count: 2337
Reuse: "N"

Hence, the Free owners count is:  maximum no of owners possible on the filer (soft limit)  - In-use owners

=  8192 – 1062

= 7130      

Note: The actual StateID is limited by platform and memory, therefore the hard limit of 16K stateID is invalid.

Then, the state hits the limit we get but NFS_ ERR_DELAY  instead of NFS_Jukebox.                            

Client count:

This is defined as the maximum number of NFSv4 Client structures.

Lease count:

This is per client value. It gives the total number of active opens, locks and delegations on files used by a client.

Important Note:

NFSv4 data structures, stateid, free owners, and client count have certain limits depending on the hardware platform. In practice, these limits depend on how much memory is generally available.

Additional Information



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.