Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

Using NFSv4

Support for NFSv4  Top

Data ONTAP supports all of the mandatory functionality in NFSv4, except the SPKM3 and LIPKEY security mechanisms, including the following:

Limitations for NFSv4  Top

Be aware of the following limitations when using NFSv4 with Data ONTAP:

How NFSv4 delegation features work on the storage system  Top

NFSv4 provides server-to-client delegation for file operations.

Delegation of file operations can reduce latency, particularly in environments that

Client support for delegation  Top

Delegations are supported only over NFSv4 (not over prior NFS versions). To verify that a specific client type supports delegation, see the client operating system documentation or feature support documentation.

Prerequisites for storage system delegation  Top

Delegation of file operations requires the following configuration criteria to be met:

Delegation works on files within any style of qtree, whether or not oplocks have been enabled.

Recalling read delegation  Top

Delegation of file operations to a client can be recalled when the lease expires, or when the storage system receives the following requests from another client:

Delegation state recovery  Top

When the server reboots, the delegation state is lost. Clients may reclaim the delegation state upon reconnection, instead of going through the entire delegation request process again. When a client holding a read delegation reboots, all delegation state information will be flushed from the storage system cache upon reconnect. The client must issue a delegation request to establish a new delegation.

Enabling and disabling read delegation  Top

By default, read delegation is disabled. To modify the read delegation setting, complete the following step.

Step

Action

1

Enter the following command:

options nfs.v4.read_delegation on | off

Note
Delegation options take effect as soon as they are changed. There is no need to reboot or restart NFS.

Enabling and disabling write delegation  Top

By default, write delegation is disabled. To modify the write delegation setting, complete the following step.

Step

Action

1

Enter the following command:

options nfs.v4.write_delegation on | off

Note
Delegation options take effect as soon as they are changed. There is no need to reboot or restart NFS.

Retrieving delegation statistics  Top

Use the nfsstat command to retrieve information about delegation requests, as described in the following sections. Results returned by the nfsstat command include delegation requests that have been granted as well as requests that have been denied due to an error. For information about delegation requests your storage system has denied, view the system log file.

You can view delegation information:

Use the procedures described in the following sections to retrieve delegation information.

Viewing delegation statistics for all clients  Top

To view delegation information for all clients, complete the following step.

Step

Action

1

Enter the following command:

nfsstat -h

The storage system will return individual delegation statistics for each client.

Viewing delegation statistics for a specific client  Top

To view delegation information for a specific client, complete the following step.

Step

Action

1

Enter the following command:

nfsstat -h <hostname or ip_address>

The storage system will return individual delegation statistics for the specified client.

Viewing delegation statistics for a vFiler unit  Top

To view delegation information specific to a vFiler unit, complete the following step.

Step

Action

1

Enter the following command:

vfiler run <filername> nfsstat -d

Viewing delegation statistics for a storage system  Top

To view delegation information specific to a storage system, complete the following step.

Step

Action

1

Enter the following command:

nfsstat -d

The storage system returns the total number of delegations handled by the storage system, including current delegations and any that have been recalled. To view only current delegations handled by the storage system, use the lock status command.

When a lease expires  Top

When a lease expires the delegation state is revoked and all of the associated state is marked "soft." That means if the storage system receives a conflicting lock request for this same file from another client before the lease has been renewed by the client previously holding the delegation, the conflicting lock is granted. If there is no conflicting lock and the client holding the delegation renews the lease, then the soft locks are changed to hard lock and will not be removed on a conflicting access. However the delegation is not granted again upon a lease renewal.

How the pseudo-fs in NFSv4 affects mount points  Top

NFSv4 uses a pseudo-fs (file system) as an entry point into your storage system for determining mount points. A pseudo-fs allows you to use one port for security, rather than several. All NFSv4 servers support the use of a pseudo-fs.

You may experience inconsistencies with mount points between NFSv3 and NFSv4, because of the pseudo-fs used in NFSv4.

In the examples that follow, you have these volumes:

/vol/vol0 (root)
/vol/vol1
/vol/home

Example 1

In NFSv3 if you do not use the complete path from /vol/vol0, and you mount filer:/, the mount point is filer:/vol/vol0. That is, if the path does not begin with /vol in NFSv3, then Data ONTAP adds /vol/vol0 to the beginning of the path.

In NFSv4, if you do not use the complete path from /vol/vol0 and you mount filer:/, you mount the root of the pseudo-fs and not /vol/vol0. Data ONTAP does not add /vol/vol0 to the beginning of the path.

Therefore, if you mount filer:/ /n/filer using NFSv3 and try the same mount using NFSv4, you would mount a different file system.

Example 2

In Data ONTAP's implementation of the NFSv4 pseudo-fs, the nodes "/" and "/vol" are always present and form the common prefix of any reference into the pseudo-fs. Any reference that does not begin with "/vol" is invalid.

In this example, there is a /vol/vol0/home directory. In NFSv3, if you mount filer:/home/users, /home is considered as the directory /vol/vol0/home. In NFSv4, if you mount filer:/home/users, /home is not interpreted as the volume /vol/home; it is considered an invalid path in the pseudo-fs tree.

Specifying the user ID domain for NFSv4  Top

The domain that Data ONTAP uses for NFSv4 user ID mapping by default is the NIS domain, if one is set. If an NIS domain is not set, the DNS domain is used. You might need to set the user ID domain if, for example, you have multiple user ID domains.

To specify the user ID domain to be used for NFSv4 user ID mapping, complete the following step.

Step

Action

1

Enter the following command:

options nfs.v4.id_domain domain

About NFSv4 ACLs  Top

Compared to NFSv4 file access without access control lists (ACL), NFSv4 ACLs provide the following benefits:

NFSv4 ACLs are different from Windows file-level ACLs (NTFS ACLs), but Data ONTAP can map NFSv4 ACLs to NTFS ACLs for viewing on Windows platforms.

Note
Data ONTAP does not support POSIX ACLs.

To set and modify NFSv4 ACLs, NFSv4 must be enabled and NFSv4 ACLs must be enabled. (See Enabling and disabling NFSv4 ACLs for more information.) Once enabled, ACLs are set or modified from clients using NFSv4.

ACL characteristics using NFSv4

With NFSv4 enabled, and nfs.v4.acl.enable on, a client using NFSv4 ACLs can set ACLs on files and directories on the system. When a file or subdirectory of a directory with an ACL is created, they inherit appropriate ACL values. While it is off, ACL values cannot be viewed from the client.

For access checking, CIFS users are mapped to UNIX users. The mapped UNIX user and that user's group membership are checked against the ACL.

If a file or directory has an ACL, that ACL is used to control access no matter what protocol--NFSv2, NFSv3, NFSv4, or CIFS--is used to access the file or directory and is used even if NFSv4 is no longer enabled on the system.

Inheriting an NFSv4 ACL

Files and directories inherit NFSv4 ACLs from parent directories (possibly with appropriate modifications).

When a file or directory is created as the result of an NFSv4 request, the ACL on the resulting file or directory depends on whether the file creation request includes an ACL or only standard UNIX file access permissions, and whether the parent directory has an ACL:

ACLs and qtrees

The security semantics of a qtree are determined by its security style and its ACL (NFSv4 or NTFS):

Enabling and disabling NFSv4 ACLs

Use the nfs.v4.acl.enable option (disabled by default) to control the setting and viewing of NFSv4 ACLs.

To modify the nfs.v4.acl.enable option setting, complete the following step.

Step

Action

1

Enter the following command:

options nfs.acl.enable on | off [off]

Note
The nfs.v4.acl.enable option does not affect whether an ACL is enforced and does not affect existing ACLs.

Setting or Modifying an NFSv4 ACL

Use the setfacl command to set or modify an NFSv4 ACL.

To set an ACL granting the user nfsuser read, write, and execute permission on file a, complete the following step.

Step

Action

1

Enter the following command:

setfacl -m user:nfsuser:rwx a

Viewing an NFSc4 ACL

To view an NFSv4 ACL, complete the following step.

Step

Action

1

Enter the following command:

getfacl a
# file: a
# owner: nfs4user
# group: engr
user::rw-
user:nfs4user:rwx #effective:rwx
group::r-- #effective:r--
mask:rwx
other:r--

Note that running the ls -l command for the same file shows the following:

-rw-r--r--+  1 nfs4user 0 May 27 17:43 a

The + in this output indicates that the Solaris client recognized that an ACL is set on the file.

Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments