exports - directories and files exported to NFS clients
/etc/exports
The /etc/exports file contains a list of directories and files that are exported by the filer. Changes to this file do not take effect until the filer executes the exportfs command or the filer is rebooted. When the filer is rebooted, it executes the exportfs -a command from the /etc/rc script to export all files and directories listed in the /etc/exports file.
Each export entry is a line in the following format:
pathname -option[,option ] ...
The following list describes the fields in an export entry:
access=hostname[:hostname]...
Give mount access to each host listed. Alternatively, you can specify a netgroup instead
of a host in the list. The netgroup must be defined in the /etc/netgroup file.
Whether the hosts can mount pathname with root access, read-and-write access, or
read-only access depends on how you use the root, rw, and ro options,
as described below.
anon=uid
If a request comes from user ID of 0 (root user ID on the client), use uid as the
effective user ID unless the client host is included in the root option. The
default value of uid is 65534. To disable root access, set uid to 65535. To
grant root access to all clients, set uid to 0.
ro
Export the pathname read-only. If you do not specify this option, the pathname
is exported read-write.
rw=hostname[:hostname]...
Export the pathname read-only to all hosts not specified in the list and read-write
to the hosts in the list. Netgroup names are not allowed in the list.
root=hostname[:hostname]...
Give root access only to the specified hosts. By default, no hosts are granted root
access. Netgroup names are not allowed in the list.
In an export entry, you can specify that a file or directory be exported to a subnet instead of individual hosts. The export entry for exporting to subnets can use the ro, rw, or root option; you cannot specify a subnet in the list for the access option.
Instead of specifying a host name or netgroup name in the entry, specify the subnet in one of the following formats:
dotted_IP/num_bits The dotted_IP field is either an IP address or a subnet number. The num_bits field specifies the size of the subnet by the number of leading bits of the netmask.
``[ network ] subnet [ netmask ] netmask'' The subnet field is the subnet number. The netmask field is the netmask.
In UNIX, it is illegal to export a directory that has an exported ancestor in the same file system. Data ONTAP does not have this restriction. For example, you can export both the / directory and the /home directory. In determining permissions, the filer uses the longest matching prefix.
In the following example, all network clients can mount the /home directory but only the adminhost can mount the / directory:
/ -access=adminhost,root=adminhost /home
The following examples show different ways of specifying an export entry that exports
the /home directory to the 123.45.67.0 subnet with the 255.255.255.0 netmask:
/home -rw=123.45.67.0/24 /home -rw=123.45.67/24 /home -rw=``network 123.45.67.0 netmask 255.255.255.0'' /home -rw=``123.45.67.0 255.255.255.0''
The filer supports a maximum of 255 host names in each rw and root option. There is no limit on the number of host names in the list following the access option. The maximum size of the /etc/exports file is about 64 KB.
na_exportfs(1)
, na_reboot(1), na_hosts(5), na_netgroup(5), na_rc(5)