When you export a resource, you can specify the access restrictions that govern how the resource can be mounted. If you export a resource without specifying access restrictions, it can be mounted read-write by all hosts.
You specify access restrictions with options in the /etc/exports file or in the exportfs command. These access restrictions options determine
It lists individual hosts, netgroups, or subnets that can mount the resource. Hosts not included in the access list are denied access to the resource. By default, the listed hosts can mount the resource read-write.
There is no limit to the number of targets you can list with the access option in the /etc/exports file. However, if you want to avoid exceeding the maximum length of an /etc/exports file entry, use netgroups or subnet addresses instead of individual host names in the list.
It determines the user ID for the root user on the client who sends the NFS requests after mounting the resource. The following list describes the effect of including or excluding a host from the root option:
Note
Having a root UID does not guarantee read-write access. If an ro option is specified for a resource, the ro option overrides the root option, making the resource a read-only resource.
You can specify up to 255 names with the root option. You can specify host names and subnets; you cannot specify netgroups.
It gives read-write access to the specified hosts. The rw option is useful if you want to make a resource readable by most hosts.
You can specify up to 255 names with the rw option. The names can be host names or subnets; you cannot specify netgroups.
It exports the resource read-only.
This option is not followed by a list of targets because it applies to all hosts that have permission to mount the resource.
It determines the UID for the root user on the client. The following table describes the effects of the anon option.
The client is not specified by the root option for the resource |
|
The UID specified by the anon option is not used. The effective UID is 0. |
The following list describes the default UID specified by the anon option and the meanings of some special UIDs:
When Data ONTAP receives a mount request for a resource, it takes into consideration all options pertaining to the resource to determine access restrictions.
The /etc/exports file contains the following entry for the /vol/vol0 volume:
/vol/vol0 -access=host1:host2,root=host1,rw=host2
The access and root options allow host1 to mount the /vol/vol0 volume with root access. The rw option, however, specifies that hosts other than host2 have only read access. As a result, host1 can only mount the /vol/vol0 volume as a read-only resource.
The /etc/exports file contains the following entry for the /vol/vol0 volume:
/vol/vol0 -access=host1:host2,root=host1,ro
The access and root options allow host1 to mount the /vol/vol0 volume with root access. The ro option, however, makes the /vol/vol0 volume a read-only resource to all hosts. As a result, host1 can only mount the /vol/vol0 volume as a read-only resource.
Copyright © 1994-2003, Network Appliance, Inc. All rights
reserved.
Part No. 210-00323
File: nfs3.htm
Last updated: 01/15/03 15:45:12