ONTAP 90 NFS Configuration Power Guide
ONTAP 90 NFS Configuration Power Guide
Contents
Deciding whether to use this guide ............................................................. 5
NFS configuration workflow ....................................................................... 6
Assessing physical storage requirements .................................................................... 6
Assessing networking requirements ............................................................................ 7
Deciding where to provision new NFS storage capacity ............................................ 8
Worksheet for gathering NFS configuration information ........................................... 8
Configuring NFS access to an SVM .......................................................... 17
Creating an SVM ....................................................................................................... 17
Verifying that the NFS protocol is enabled on the SVM ........................................... 18
Opening the export policy of the SVM root volume ................................................. 19
Creating an NFS server ............................................................................................. 20
Creating a LIF ........................................................................................................... 22
Enabling DNS for host-name resolution ................................................................... 24
Configuring name services ........................................................................................ 25
Configuring the name service switch table ................................................... 25
Configuring local UNIX users and groups .................................................... 26
Working with netgroups ................................................................................ 29
Creating an NIS domain configuration ......................................................... 32
Using LDAP .................................................................................................. 33
Using Kerberos with NFS for strong security ........................................................... 39
Verifying permissions for Kerberos configuration ........................................ 40
Creating an NFS Kerberos realm configuration ............................................ 41
Configuring NFS Kerberos permitted encryption types ................................ 42
Enabling Kerberos on a data LIF .................................................................. 43
Adding storage capacity to an NFS-enabled SVM .................................. 45
Creating an export policy .......................................................................................... 45
Adding a rule to an export policy .............................................................................. 46
Creating a volume or qtree storage container ............................................................ 50
Creating a volume ......................................................................................... 50
Creating a qtree ............................................................................................. 52
Securing NFS access using export policies ............................................................... 52
Managing the processing order of export rules ............................................. 53
Assigning an export policy to a volume ........................................................ 53
Assigning an export policy to a qtree ............................................................ 54
Verifying NFS client access from the cluster ............................................................ 55
Testing NFS access from client systems ................................................................... 55
Where to find additional information ....................................................... 58
How ONTAP exports differ from 7-Mode exports .................................. 60
Comparison of exports in 7-Mode and ONTAP ........................................................ 60
Examples of ONTAP export policies ........................................................................ 61
Copyright information ............................................................................... 64
4 | NFS Configuration Power Guide
• You want to use any version of NFS currently supported by ONTAP: NFSv3, NFSv4, NFSv4.1,
or NFSv4.1 with pNFS.
• You want to use the command-line interface (CLI), not OnCommand System Manager or an
automated scripting tool.
You can use the NFS Configuration Express Guide and other Express Guides to support
configuration with System Manager, and OnCommand Workflow Automation for automated
scripting support.
• You want to use best practices, not explore every available option.
Details about command syntax are available from CLI help and ONTAP man pages.
• You want to provision storage on a FlexVol volume or a qtree, not an Infinite Volume.
If this guide is not suitable for your situation, you should see the following documentation instead:
Steps
If there is an aggregate with sufficient space, record its name in the worksheet.
Example
2. If there are no aggregates with sufficient space, add disks to an existing aggregate by using the
storage aggregate add-disks command, or create a new aggregate by using the storage
aggregate create command.
Related information
ONTAP concepts
• Broadcast domains
• Failover groups (as required, in addition to the default failover group for each broadcast domain)
• External firewalls
Steps
• When possible, you should use the port with the highest speed for the data network.
• All components in the data network must have the same MTU setting for best performance.
8 | NFS Configuration Power Guide
2. If you are planning to use a subnet name to allocate the IP address and network mask value for a
LIF, verify that the subnet exists and has sufficient addresses available:
network subnet show
Subnets contain a pool of IP addresses that belong to the same layer 3 subnet. Subnets are created
by using the network subnet create command.
4. If you want to use IPv6 addresses, verify that IPv6 is enabled on the cluster:
network options ipv6 show
If required, you can enable IPv6 by using the network options ipv6 modify command.
Choices
• If you want to provision a volume or qtree on a new SVM, or on an existing SVM that has NFS
enabled but not configured, complete the steps in both “Configuring NFS access to an SVM” and
“Adding NFS storage to an NFS-enabled SVM”.
Configuring NFS access to an SVM on page 17
Adding NFS storage to an NFS-enabled SVM on page 45
You might choose to create a new SVM if one of the following is true:
◦ You have existing SVMs in a cluster in which you do not want to enable NFS support.
◦ You have one or more NFS-enabled SVMs in a cluster, and you want another NFS server in an
isolated namespace (multi-tenancy scenario).
You should also choose this option to provision storage on an existing SVM that has NFS enabled
but not configured. This might be the case if you created the SVM for SAN access or if no
protocols were enabled when the SVM was created.
After enabling NFS on the SVM, proceed to provision a volume or qtree.
• If you want to provision a volume or qtree on an existing SVM that is fully configured for NFS
access, complete the steps in “Adding NFS storage to an NFS-enabled SVM”.
Adding NFS storage to an NFS-enabled SVM on page 45
• If you are configuring NFS access to an SVM, you should complete both sections.
Configuring NFS access to an SVM on page 8
Adding storage capacity to an NFS-enabled SVM on page 14
• If you are adding storage capacity to an NFS-enabled SVM, you should complete only the second
section.
If you are using Kerberos, you should enable Kerberos on multiple LIFs.
1
2
3
...
n
Note: Starting in ONTAP 9.2, the field -ldap-servers replaces the field -servers. This new
field can take either a hostname or an IP address for the LDAP server.
You supply these values with the vserver nfs kerberos interface enable command.
You supply these values for each rule with the vserver export-policy rule create
command.
You must create one or more rules for each export policy.
3
...
n
Steps
1. Creating an SVM on page 17
2. Verifying that the NFS protocol is enabled on the SVM on page 18
3. Opening the export policy of the SVM root volume on page 19
4. Creating an NFS server on page 20
5. Creating a LIF on page 22
6. Enabling DNS for host-name resolution on page 24
7. Configuring name services on page 25
8. Using Kerberos with NFS for strong security on page 39
Creating an SVM
If you do not already have at least one SVM in a cluster to provide data access to NFS clients, you
must create one.
Steps
1. Create an SVM:
vserver create -vserver vserver_name -rootvolume root_volume_name -
aggregate aggregate_name -rootvolume-security-style unix -language
C.UTF-8 -ipspace ipspace_name
The Allowed Protocols field must include NFS. You can edit this list later.
The Vserver Operational State field must display the running state. If it displays the
initializing state, it means that some intermediate operation such as root volume creation
failed, and you must delete the SVM and re-create it.
Examples
The following command creates an SVM for data access in the IPspace ipspaceA:
18 | NFS Configuration Power Guide
The following command shows that an SVM was created with a root volume of 1 GB, and it
was started automatically and is in running state. The root volume has a default export policy
that does not include any rules, so the root volume is not exported upon creation.
You can also disable protocols on SVMs using the vserver remove-protocols command.
Steps
1. Check which protocols are currently enabled and disabled for the SVM:
vserver show -vserver vserver_name -protocols
You can also use the vserver show-protocols command to view the currently enabled
protocols on all SVMs in the cluster.
• To disable a protocol:
vserver remove-protocols -vserver vserver_name -protocols
protocol_name[,protocol_name,...]
3. Confirm that the enabled and disabled protocols were updated correctly:
vserver show -vserver vserver_name -protocols
Example
The following command displays which protocols are currently enabled and disabled (allowed
and disallowed) on the SVM named vs1:
The following command allows access over NFS by adding nfs to the list of enabled protocols
on the SVM named vs1:
Steps
1. If you are using an existing SVM, check the default root volume export policy:
vserver export-policy rule show
Example
The command output should be similar to the following:
Vserver: vs1.example.com
Policy Name: default
Rule Index: 1
Access Protocol: nfs
Client Match Hostname, IP Address, Netgroup, or Domain: 0.0.0.0/0
20 | NFS Configuration Power Guide
If such a rule exists that allows open access, this task is complete. If not, proceed to the next step.
If the SVM will only contain volumes secured by Kerberos, you can set the export rule options -
rorule, -rwrule, and -superuser for the root volume to krb5 or krb5i. For example:
-rorule krb5i -rwrule krb5i -superuser krb5i
3. Verify rule creation by using the vserver export-policy rule show command.
Result
Any NFS client can now access any volume or qtree created on the SVM.
• The NFSv4 user ID mapping domain name must be the same on the NFSv4 server and target
clients.
It does not necessarily need to be the same as an LDAP or NIS domain name as long as the
NFSv4 server and clients are using the same name.
• For security reasons, you should use LDAP for name services in NFSv4 deployments.
Steps
You can choose to enable any combination of NFS versions. If you want to support pNFS, you
must enable both -v4.1 and -v4.1-pnfs options.
If you enable v4 or later, you should also be sure that the following options are set correctly:
• -v4-id-domain
This optional parameter specifies the domain portion of the string form of user and group
names as defined by the NFSv4 protocol. By default, ONTAP uses the NIS domain if one is
set; if not, the DNS domain is used. You must supply a value that matches the domain name
used by target clients.
• -v4-numeric-ids
This optional parameter specifies whether the support for numeric string identifiers in NFSv4
owner attributes is enabled. The default setting is enabled but you should verify that the target
clients support it.
You can enable additional NFS features later by using the vserver nfs modify command.
Examples
The following command creates an NFS server on the SVM named vs1 with NFSv3 and
NFSv4.0 enabled:
vs1::> vserver nfs create -vserver vs1 -v3 enabled -v4.0 enabled -
v4-id-domain my_domain.com
The following commands verify the status and configuration values of the new NFS server
named vs1:
Vserver: vs1
General NFS Access: true
NFS v3: enabled
NFS v4.0: enabled
UDP Protocol: enabled
TCP Protocol: enabled
Default Windows User: -
NFSv4.0 ACL Support: disabled
NFSv4.0 Read Delegation Support: disabled
NFSv4.0 Write Delegation Support: disabled
NFSv4 ID Mapping Domain: my_domain.com
...
22 | NFS Configuration Power Guide
Creating a LIF
A LIF is an IP address associated with a physical or logical port. If there is a component failure, a
LIF can fail over to or be migrated to a different physical port, thereby continuing to communicate
with the network.
• The underlying physical or logical network port must have been configured to the administrative
up status.
• If you are planning to use a subnet name to allocate the IP address and network mask value for a
LIF, the subnet must already exist.
Subnets contain a pool of IP addresses that belong to the same layer 3 subnet. They are created
using the network subnet create command.
• You can create both IPv4 and IPv6 LIFs on the same network port.
Steps
1. Create a LIF:
network interface create -vserver vserver_name -lif lif_name -role data
-data-protocol nfs -home-node node_name -home-port port_name {-address
IP_address -netmask IP_address | -subnet-name} -firewall-policy data -
auto-revert {true|false}
• The -data-protocol parameter must be specified when the LIF is created, and cannot be
modified later without destroying and re-creating the data LIF.
• -home-node is the node to which the LIF returns when the network interface revert
command is run on the LIF.
You can also specify whether the LIF should automatically revert to the home-node and home-
port with the -auto-revert option.
• -home-port is the physical or logical port to which the LIF returns when the network
interface revert command is run on the LIF.
• You can specify an IP address with the -address and -netmask options, or you enable
allocation from a subnet with the -subnet_name option.
• When using a subnet to supply the IP address and network mask, if the subnet was defined
with a gateway, a default route to that gateway is added automatically to the SVM when a LIF
is created using that subnet.
• If you assign IP addresses manually (without using a subnet), you might need to configure a
default route to a gateway if there are clients or domain controllers on a different IP subnet.
The network route create man page contains information about creating a static route
within a SVM.
Configuring NFS access to an SVM | 23
• For the -firewall-policy option, use the same default data as the LIF role.
You can create and add a custom firewall policy later if desired.
• -auto-revert allows you to specify whether a data LIF is automatically reverted to its home
node under circumstances such as startup, changes to the status of the management database,
or when the network connection is made. The default setting is false, but you can set it to
false depending on network management policies in your environment.
2. Verify that the LIF was created successfully by using the network interface show command.
4. If you are using Kerberos, repeat Steps 1 through 3 to create additional LIFs.
Kerberos must be enabled separately on each of these LIFs.
Examples
The following command creates a LIF and specifies the IP address and network mask values
using the -address and -netmask parameters:
The following command creates a LIF and assigns IP address and network mask values from
the specified subnet (named client1_sub):
The following command shows all the LIFs in cluster-1. Data LIFs datalif1 and datalif3 are
configured with IPv4 addresses, and datalif4 is configured with an IPv6 address:
Related tasks
Enabling Kerberos on a data LIF on page 43
Steps
Example
The following command enables external DNS server servers on the SVM vs1:
Note: Starting in ONTAP 9.2, the vserver services name-service dns create
command performs an automatic configuration validation and reports an error message if
ONTAP cannot contact the name server.
2. Display the DNS domain configurations by using the vserver services name-service
dns show command.
Example
The following command displays the DNS configurations for all SVMs in the cluster:
The following command displays detailed DNS configuration information for SVM vs1:
Configuring NFS access to an SVM | 25
3. Validate the status of the name servers by using the vserver services name-service dns
check command.
Example
Choices
• Configuring the name service switch table on page 25
• Configuring local UNIX users and groups on page 26
• Working with netgroups on page 29
• Creating an NIS domain configuration on page 32
• Using LDAP on page 33
Steps
2. Verify that the name service switch table contains the expected entries in the desired order:
vserver services name-service ns-switch show -vserver vserver_name
If you want to make any corrections, you must use the vserver services name-service
ns-switch modify or vserver services name-service ns-switch delete
commands.
Example
The following example creates a new entry in the name service switch table for the SVM vs1
to use the local netgroup file and an external NIS server to look up netgroup information in that
order:
• You must configure the name services you have specified for the SVM to provide data access.
• If you delete any name service for the SVM, you must remove it from the name service switch
table as well.
The client access to the storage system might not work as expected, if you fail to delete the name
service from the name service switch table.
Choices
• Creating a local UNIX user on page 27
• Loading local UNIX users from a URI on page 27
• Creating a local UNIX group on page 28
• Adding a user to a local UNIX group on page 28
• Loading local UNIX groups from a URI on page 29
Configuring NFS access to an SVM | 27
Step
-user user_name specifies the user name. The length of the user name must be 64 characters or
fewer.
-id integer specifies the user ID that you assign.
-primary-gid integer specifies the primary group ID. This adds the user to the primary
group. After creating the user, you can manually add the user to any desired additional group.
Example
The following command creates a local UNIX user named johnm (full name “John Miller”) on
the SVM named vs1. The user has the ID 123 and the primary group ID 100.
Steps
1. Create a file containing the list of local UNIX users you want to load.
The file must contain user information in the UNIX /etc/passwd format:
user_name: password: user_ID: group_ID: full_name
The command discards the value of the password field and the values of the fields after the
full_name field (home_directory and shell).
2. Verify that the list does not contain any duplicate information.
If the list contains duplicate entries, loading the list fails with an error message.
5. Load the file containing the list of local UNIX users into SVMs from the URI:
vserver services name-service unix-user load-from-uri -vserver
vserver_name -uri {ftp|http|ftps|https}://uri -overwrite {true|false}
28 | NFS Configuration Power Guide
Example
The following command loads a list of local UNIX users from the URI ftp://
ftp.example.com/passwd into the SVM named vs1. Existing users on the SVM are not
overwritten by information from the URI.
Step
-name group_name specifies the group name. The length of the group name must be 64
characters or fewer.
-id integer specifies the group ID that you assign.
Example
The following command creates a local group named eng on the SVM named vs1. The group
has the ID 101.
Step
-name group_name specifies the name of the UNIX group to add the user to in addition to the
user's primary group.
Example
The following command adds a user named max to a local UNIX group named eng on the
SVM named vs1:
Configuring NFS access to an SVM | 29
Steps
1. Create a file containing the list of local UNIX groups you want to load.
The file must contain group information in the UNIX /etc/group format:
group_name: password: group_ID: comma_separated_list_of_users
2. Verify that the list does not contain any duplicate information.
The list must not contain duplicate entries, or else loading the list fails. If there are entries already
present in the SVM, you must either set the -overwrite parameter to true to overwrite all
existing entries with the new file, or ensure that the new file does not contain any entries that
duplicate existing entries.
5. Load the file containing the list of local UNIX groups into the SVM from the URI:
vserver services name-service unix-group load-from-uri -vserver
vserver_name -uri {ftp|http|ftps|https}://uri -overwrite {true|false}
-overwrite {true|false} specifies whether to overwrite entries. The default is false. If you
specify this parameter as true, ONTAP replaces the entire existing local UNIX group database
of the specified SVM with the entries from the file you are loading.
Example
The following command loads a list of local UNIX groups from the URI ftp://
ftp.example.com/group into the SVM named vs1. Existing groups on the SVM are not
overwritten by information from the URI.
from a uniform resource identifier (URI) into SVMs using the vserver services name-service
netgroup load command.
• All hosts in netgroups, regardless of source (NIS, LDAP, or local files), must have both forward
(A) and reverse (PTR) DNS records to provide consistent forward and reverse DNS lookups.
In addition, if an IP address of a client has multiple PTR records, all of those host names must be
members of the netgroup and have corresponding A records.
• The names of all hosts in netgroups, regardless of their source (NIS, LDAP, or local files), must
be correctly spelled and use the correct case. Case inconsistencies in host names used in
netgroups can lead to unexpected behavior, such as failed export checks.
• All IPv6 addresses specified in netgroups must be shortened and compressed as specified in RFC
5952.
For example, 2011:hu9:0:0:0:0:3:1 must be shortened to 2011:hu9::3:1.
• You can use the vserver export-policy netgroup check-membership command to help
determine whether a client IP is a member of a certain netgroup.
• You can use the vserver services name-service getxxbyyy netgrp command to check
whether a client is part of a netgroup.
The underlying service for doing the lookup is selected based on the configured name service
switch order.
• The file must use the same proper netgroup text file format that is used to populate NIS.
ONTAP checks the netgroup text file format before loading it. If the file contains errors, it will
not be loaded and a message is displayed indicating the corrections you have to perform in the
file. After correcting the errors, you can reload the netgroup file into the specified SVM.
• Any alphabetic characters in host names in the netgroup file should be lowercase.
• Only primary DNS host names can be used when defining host names in the netgroup file.
To avoid export access issues, host names should not be defined using DNS CNAME or round
robin records.
• The user and domain portions of triples in the netgroup file should be kept empty because
ONTAP does not support them.
Only the host/IP part is supported.
Configuring NFS access to an SVM | 31
Step
Loading the netgroup file and building the netgroup.byhost map can several minutes.
If you want to update the netgroups, you can edit the file and load the updated netgroup file into
the SVM.
Example
The following command loads netgroup definitions into the SVM named vs1 from the HTTP
URL http://intranet/downloads/corp-netgroup:
Steps
Example
After the privilege level is set, the following command displays netgroup status for all SVMs:
Warning: These advanced commands are potentially dangerous; use them only when
directed to do so by technical support.
Do you wish to continue? (y or n): y
Steps
Example
The following command creates and makes an active NIS domain configuration for an NIS
domain called nisdomain on the SVM named vs1 with an NIS server at IP address 192.0.2.180:
Using LDAP
If LDAP is used in your environment for name services, you need to work with your LDAP
administrator to determine requirements and appropriate storage system configurations, then enable
the SVM as an LDAP client.
• Before configuring LDAP for ONTAP, you should verify that your site deployment meets best
practices for LDAP server and client configuration. In particular, the following conditions must be
met.
◦ The domain name of the LDAP server must match the entry on the LDAP client.
◦ If the LDAP server requires session security measures, you must configure them in the LDAP
client.
The following session security options are available.
⁃ LDAP signing (provides data integrity checking) and LDAP signing and sealing (provides
data integrity checking and encryption)
◦ To enable signed and sealed LDAP queries, the following services must be configured.
⁃ Kerberos servers must have SRV records present on the DNS server.
◦ To enable TLS encrypted LDAP queries, the following services must be configured.
• You must enter an LDAP schema when configuring the LDAP client on the SVM.
In most cases, one of the default ONTAP schemas will be appropriate. However, if the LDAP
schema in your environment differs from these, you must create a new LDAP client schema for
ONTAP before creating the LDAP client. Consult with your LDAP administrator about
requirements for your environment.
Steps
1. Creating a new LDAP client schema on page 33
2. Installing the self-signed root CA certificate on the SVM on page 34
3. Creating an LDAP client configuration on page 35
4. Associating the LDAP client configuration with SVMs on page 37
5. Verifying LDAP sources in the name service switch table on page 38
compatibility. If the LDAP schema in your environment differs from these, you must create a new
LDAP client schema for ONTAP before creating the LDAP client configuration.
Steps
1. Display the existing LDAP client schema templates to identify the one you want to copy:
vserver services name-service ldap client schema show
Steps
b. Open the certificate .pem file with a text editor, copy the certificate, including the lines
beginning with -----BEGIN CERTIFICATE----- and ending with -----END
CERTIFICATE-----, and then paste the certificate after the command prompt.
Configuring NFS access to an SVM | 35
Steps
1. Consult with your LDAP administrator to determine the appropriate configuration values for the
vserver services name-service ldap client create command:
• Use the -ad-domain option to enable LDAP server discovery in the Active Directory
domain.
You can use the -preferred-ad-servers option to specify one or more preferred
Active Directory servers by IP address in a comma-delimited list. After the client is
created, you can modify this list by using the vserver services name-service
ldap client modify command.
• Use the -servers option to specify one or more LDAP servers (AD or UNIX) by IP
address in a comma-delimited list.
Note: The -servers option is deprecated in ONTAP 9.2. Starting in ONTAP 9.2, the field
-ldap-servers replaces the field -servers. This new field can take either a hostname or
an IP address for the LDAP server.
• AD-IDMU
Based on Active Directory Identity Management for UNIX, this schema is appropriate for
most Windows 2008, Windows 2012 and later AD servers.
• AD-SFU
Based on Active Directory Services for UNIX, this schema is appropriate for most
Windows 2003 and earlier AD servers.
36 | NFS Configuration Power Guide
• RFC-2307
Based on RFC-2307 (An Approach for Using LDAP as a Network Information Service),
this schema is appropriate for most UNIX AD servers.
• --session-security {none|sign|seal}
You can enable signing (sign, data integrity), signing and sealing (seal, data integrity
and encryption), or neither (none, no signing or sealing). The default value is none.
You should also set -min-bind-level {sasl} unless you want the bind authentication
to fall back to anonymous or simple if the signing and sealing bind fails.
• -use-start-tls {true|false}
If set to true and the LDAP server supports it, the LDAP client uses an encrypted TLS
connection to the server. The default value is false. You must install a self-signed root
CA certificate of the LDAP server to use this option.
Note: If the SVM has a CIFS server added to a domain and the LDAP server is one of the
domain controllers of the home-domain of the CIFS server, then you can modify the -
session-security-for-ad-ldap option by using the vserver cifs security
modify command.
Note: You must provide the SVM name when creating an LDAP client configuration.
Examples
The following command creates a new LDAP client configuration named ldap1 for the SVM
vs1 to work with an Active Directory server for LDAP:
The following command creates a new LDAP client configuration named ldap1 for the SVM
vs1 to work with an Active Directory server for LDAP on which signing and sealing is
required:
The following command modifies the LDAP client configuration named ldap1 for the SVM
vs1 by specifying the base DN:
• An LDAP domain must already exist within the network and must be accessible to the cluster that
the SVM is located on.
Steps
Note: Starting in ONTAP 9.2, the vserver services name-service ldap create
command performs an automatic configuration validation and reports an error message if
ONTAP is unable to contact the name server.
Example
The following command enables LDAP on the “vs1” SVM and configures it to use the “ldap1”
LDAP client configuration:
2. Validate the status of the name servers by using the vserver services name-service ldap check
command.
The following command validates LDAP servers on the SVM vs1.
Example
| Vserver: vs1 |
| Client Configuration Name: c1 |
| LDAP Status: up |
| LDAP Status Details: Successfully connected to LDAP server
"10.11.12.13". |
Steps
Example
The following command shows the results for the SVM My_SVM:
namemap specifies the sources to search for name mapping information and in what order. In a
UNIX-only environment, this entry is not necessary. Name mapping is only required in a mixed
environment using both UNIX and Windows.
• To promote redundant server access, Kerberos should be enabled on several data LIFs on multiple
nodes in the cluster using the same SPN.
• When Kerberos is enabled on the SVM, one of the following security methods must be specified
in export rules for volumes or qtrees depending on your NFS client configuration.
In addition to the Kerberos server and clients, the following external services must be configured for
ONTAP to support Kerberos:
• Directory service
You should use a secure directory service in your environment, such as Active Directory or
OpenLDAP, that is configured to use LDAP over SSL/TLS. Do not use NIS, whose requests are
sent in clear text and are hence not secure.
• NTP
You must have a working time server running NTP. This is necessary to prevent Kerberos
authentication failure due to time skew.
Steps
1. Verifying permissions for Kerberos configuration on page 40
2. Creating an NFS Kerberos realm configuration on page 41
3. Configuring NFS Kerberos permitted encryption types on page 42
4. Enabling Kerberos on a data LIF on page 43
Steps
The root volume of the SVM must have the following configuration:
Name... Setting...
UID root or ID 0
GID root or ID 0
UNIX permissions 755
If these values are not shown, use the volume modify command to update them.
If these values are not shown, you can use the vserver services name-service unix-
user modify command to update them.
If these values are not shown, you can use the vserver services name-service unix-
group modify command to update them.
Steps
1. Consult with your Kerberos administrator to determine the appropriate configuration values to
supply with the vserver nfs kerberos realm create command.
Examples
The following command creates an NFS Kerberos realm configuration for the SVM vs1 that
uses a Microsoft Active Directory server as the KDC server. The Kerberos realm is
AUTH.EXAMPLE.COM. The Active Directory server is named ad-1 and its IP address is
10.10.8.14. The permitted clock skew is 300 seconds (the default). The IP address of the KDC
server is 10.10.8.14, and its port number is 88 (the default). “Microsoft Kerberos config” is the
comment.
The following command creates an NFS Kerberos realm configuration for the SVM vs1 that
uses an MIT KDC. The Kerberos realm is SECURITY.EXAMPLE.COM. The permitted clock
skew is 300 seconds. The IP address of the KDC server is 10.10.9.1, and its port number is 88.
The KDC vendor is Other to indicate a UNIX vendor. The IP address of the administrative
server is 10.10.9.1, and its port number is 749 (the default). The IP address of the password
server is 10.10.9.1, and its port number is 464 (the default). “UNIX Kerberos config” is the
comment.
• Enabling or disabling AES entirely (both AES-128 and AES-256) on SVMs is disruptive because
it destroys the original DES principal/keytab file, thereby requiring that the Kerberos
configuration be disabled on all LIFs for the SVM.
Before making this change, you should verify that NFS clients do not rely on AES encryption on
the SVM.
• Enabling or disabling DES or 3DES does not require any changes to the Kerberos configuration
on LIFs.
Step
Steps
ONTAP requires the secret key for the SPN from the KDC to enable the Kerberos interface.
For Microsoft KDCs, the KDC is contacted and a user name and password prompt are issued at
the CLI to obtain the secret key. If you need to create the SPN in a different OU of the Kerberos
realm, you can specify the optional -ou parameter.
For non-Microsoft KDCs, the secret key can be obtained using one of two methods:
Example
The following command creates and verifies an NFS Kerberos configuration for the SVM
named vs1 on the logical interface ves03-d1, with the SPN nfs/ves03-
[email protected] in the OU lab2ou:
Steps
1. Creating an export policy on page 45
2. Adding a rule to an export policy on page 46
3. Creating a volume or qtree storage container on page 50
4. Securing NFS access using export policies on page 52
5. Verifying NFS client access from the cluster on page 55
6. Testing NFS access from client systems on page 55
Related concepts
Configuring name services on page 25
Using Kerberos with NFS for strong security on page 39
Related tasks
Opening the export policy of the SVM root volume on page 19
Steps
Example
The following commands create and verify the creation of an export policy named exp1 on the
SVM named vs1:
46 | NFS Configuration Power Guide
• The export policy you want to add the export rules to must already exist.
• DNS must be correctly configured on the data SVM and DNS servers must have correct entries
for NFS clients.
This is because ONTAP performs DNS lookups using the DNS configuration of the data SVM for
certain client match formats, and failures in export policy rule matching can prevent client data
access.
• If you are authenticating with Kerberos, you must have determined which of the following
security methods is used on your NFS clients:
Steps
1. Identify the clients and the client match format for the new rule.
The -clientmatch option specifies the clients to which the rule applies. Single or multiple
client match values can be specified; specifications of multiple values must be separated by
commas. You can specify the match in any of the following formats:
You can also combine types of client definitions; for example, .example.com,@netgroup1.
When specifying IP addresses, note the following:
• When specifying individual IP addresses in export rules for granular management of client
access, do not specify IP addresses that are dynamically (for example, DHCP) or temporarily
(for example, IPv6) assigned.
Otherwise, the client loses access when its IP address changes.
• Entering an IPv6 address with a network mask, such as ff::12/ff::00, is not allowed.
Note: A client can only get read-write access for a specific security type if the export rule
allows read-only access for that security type as well. If the read-only parameter is more
restrictive for a security type than the read-write parameter, the client might not get read-write
access. The same is true for superuser access.
You can specify a comma-separated list of multiple security types for a rule. If you specify the
security type as any or never, do not specify any other security types. Choose from the
following valid security types:
When security type is set to... A matching client can access the exported
data...
any Always, regardless of incoming security type.
48 | NFS Configuration Power Guide
When security type is set to... A matching client can access the exported
data...
none If listed alone, clients with any security type
are granted access as anonymous. If listed
with other security types, clients with a
specified security type are granted access and
clients with any other security type are
granted access as anonymous.
never Never, regardless of incoming security type.
krb5 If it is authenticated by Kerberos 5.
Authentication only: The header of each
request and response is signed.
krb5i If it is authenticated by Kerberos 5i.
Authentication and integrity: The header and
body of each request and response is signed.
krb5p If it is authenticated by Kerberos 5p.
Authentication, integrity, and privacy: The
header and body of each request and response
is signed, and the NFS data payload is
encrypted.
ntlm If it is authenticated by CIFS NTLM.
sys If it is authenticated by NFS AUTH_SYS.
The recommended security type is sys, or if Kerberos is used, krb5, krb5i, or krb5p.
If you are using Kerberos with NFSv3, the export policy rule must allow -rorule and -rwrule
access to sys in addition to krb5. This is because of the need to allow Network Lock Manager
(NLM) access to the export.
b. Select an index number for the new rule depending on the order it
should be evaluated.
Adding storage capacity to an NFS-enabled SVM | 49
7. Display the rules for the export policy to verify that the new rule is present:
vserver export-policy rule show -policyname policy_name
The command displays a summary for that export policy, including a list of rules applied to that
policy. ONTAP assigns each rule a rule index number. After you know the rule index number, you
can use it to display detailed information about the specified export rule.
8. Verify that the rules applied to the export policy are configured correctly:
vserver export-policy rule show -policyname policy_name -vserver
vserver_name -ruleindex integer
Examples
The following commands create and verify the creation of an export rule on the SVM named
vs1 in an export policy named rs1. The rule has the index number 1. The rule matches any
client in the domain eng.company.com and the netgroup @netgroup1. The rule enables all NFS
access. It enables read-only and read-write access to users that authenticated with AUTH_SYS.
Clients with the UNIX user ID 0 (zero) are anonymized unless authenticated with Kerberos.
Vserver: vs1
Policy Name: exp1
Rule Index: 1
Access Protocol: nfs
Client Match Hostname, IP Address, Netgroup, or Domain:
eng.company.com,@netgroup1
RO Access Rule: sys
RW Access Rule: sys
User ID To Which Anonymous Users Are Mapped: 65534
Superuser Security Types: krb5
Honor SetUID Bits in SETATTR: true
Allow Creation of Devices: true
The following commands create and verify the creation of an export rule on the SVM named
vs2 in an export policy named expol2. The rule has the index number 21. The rule matches
clients to members of the netgroup dev_netgroup_main. The rule enables all NFS access. It
enables read-only access for users that authenticated with AUTH_SYS and requires Kerberos
50 | NFS Configuration Power Guide
authentication for read-write and root access. Clients with the UNIX user ID 0 (zero) are
denied root access unless authenticated with Kerberos.
Vserver: vs2
Policy Name: expol2
Rule Index: 21
Access Protocol: nfs
Client Match Hostname, IP Address, Netgroup, or Domain:
@dev_netgroup_main
RO Access Rule: sys
RW Access Rule: krb5
User ID To Which Anonymous Users Are Mapped: 65535
Superuser Security Types: krb5
Honor SetUID Bits in SETATTR: true
Allow Creation of Devices: true
Choices
• Creating a volume on page 50
• Creating a qtree on page 52
Creating a volume
You can create a volume and specify its junction point and other properties by using the volume
create command.
Steps
If you want to create a volume in a new directory (in a new hierarchy under a new volume), for
example, /new_dir/new_vol, then you must first create a new parent volume that is junctioned
to the SVM root volume. You would then create the new child volume in the junction path of the
new parent volume (new directory).
If you plan to use an existing export policy, you can specify it when you create the volume. You
can also add an export policy later with the volume modify command.
2. Verify that the volume was created with the desired junction point:
volume show -vserver vserver_name -volume volume_name -junction
Examples
The following command creates a new volume named users1 on the SVM vs1.example.com
and the aggregate aggr1. The new volume is made available at /users. The volume is 750 GB
in size, and its volume guarantee is of type volume (by default).
The following command creates a new volume named “home4” on the SVM
“vs1.example.com” and the aggregate “aggr1”. The directory /eng/ already exists in the
namespace for the vs1 SVM, and the new volume is made available at /eng/home, which
becomes the home directory for the /eng/ namespace. The volume is 750 GB in size, and its
volume guarantee is of type volume (by default).
Creating a qtree
You can create a qtree to contain your data and specify its properties by using the volume qtree
create command.
• The SVM and the volume that will contain the new qtree must already exist.
• The SVM security style must be UNIX, and NFS should be set up and running.
Steps
You can specify the volume and qtree as separate arguments or specify the qtree path argument in
the format /vol/volume_name/_qtree_name.
By default, qtrees inherit the export policies of their parent volume, but they can be configured to
use their own. If you plan to use an existing export policy, you can specify it when you create the
qtree. You can also add an export policy later with the volume qtree modify command.
2. Verify that the qtree was created with the desired junction path:
volume qtree show -vserver vserver_name { -volume volume_name -qtree
qtree_name | -qtree-path qtree path }
Example
The following example creates a qtree named qt01 located on SVM vs1.example.com that has
a junction path /vol/data1:
existing policy, or create a new policy and rules. You can also check the configuration of export
policies
Note: Beginning in ONTAP 9.3, you can enable export policy configuration checking as a
background job that records any rules violations in an error rule list. The vserver export-
policy config-checker commands invoke the checker and display results, which you can use
to verify your configuration and delete erroneous rules from the policy.
The commands only validate export configuration for host names, netgroups, and anonymous
users.
Choices
• Managing the processing order of export rules on page 53
• Assigning an export policy to a volume on page 53
• Assigning an export policy to a qtree on page 54
Step
Example
The following command changes the index number of an export rule at index number 3 to
index number 2 in an export policy named rs1 on the SVM named vs1:
Steps
1. If an export policy was not specified when the volume was created, assign an export policy to the
volume:
54 | NFS Configuration Power Guide
Example
The following commands assign the export policy nfs_policy to the volume vol1 on the SVM
vs1 and verify the assignment:
Steps
1. If an export policy was not specified when the qtree was created, assign an export policy to the
qtree:
volume qtree modify -vserver vserver_name -qtree-path /vol/volume_name/
qtree_name -export-policy export_policy_name
Example
The following commands assign the export policy nfs_policy to the qtree qt1 on the SVM vs1
and verify the assignment:
Adding storage capacity to an NFS-enabled SVM | 55
Steps
1. On the cluster, check client access to exports by using the vserver export-policy check-
access command.
The following command checks read/write access for an NFSv3 client with the IP address 1.2.3.4
to the volume home2. The command output shows that the volume uses the export policy exp-
home-dir and that access is denied.
2. Examine the output to determine whether the export policy works as intended and the client
access behaves as expected.
Specifically, you should verify which export policy is used by the volume or qtree and the type of
access the client has as a result.
• The client system must have an IP address that is allowed by the export rule you specified earlier.
• You must have the login information for the root user.
Steps
1. On the cluster, verify the IP address of the LIF that is hosting the new volume:
network interface show –vserver svm_name
56 | NFS Configuration Power Guide
4. Create and mount a new folder using the IP address of the SVM:
Example
The following commands create a folder named test1, mount the vol1 volume at the 192.0.2.130
IP address on the test1 mount folder, and change to the new test1 directory:
5. Create a new file, verify that it exists, and write text to it:
c. Enter:
cat >filename
Type some text, and then press Ctrl+D to write text to the test file.
d. Display the content of the test file.
cat filename
Example
6. As root, set any desired UNIX ownership and permissions on the mounted volume.
7. On a UNIX client system identified in your export rules, log in as one of the authorized users who
now has access to the new volume, and repeat the procedures in steps 3 on page 56 to 5 on page
56 to verify that you can mount the volume and create a file.
58
NFS configuration
You can further configure NFS access using the following comprehensive guides and technical
reports:
• NFS management
Describes how to configure and manage file access using NFS.
• NetApp Technical Report 4067: NFS Best Practice and Implementation Guide
Serves as an NFSv3 and NFSv4 operational guide, and provides an overview of the ONTAP
operating system with a focus on NFSv4.
• NetApp Technical Report 3580: NFSv4 Enhancements and Best Practices Guide: Data ONTAP
Implementation
Describes the best practices that should be followed while implementing NFSv4 components on
AIX, Linux, or Solaris clients attached to systems running ONTAP.
Networking configuration
You can further configure networking features and name services using the following comprehensive
guides and technical reports:
• NFS management
Describes how to configure and manage ONTAP networking.
• NetApp Technical Report 4182: Ethernet Storage Design Considerations and Best Practices for
Clustered Data ONTAP Configurations
Describes the implementation of ONTAP network configurations, and provides common network
deployment scenarios and best practice recommendations.
• Data protection
Describes how to create load-sharing mirrors on every node of an ONTAP 9 cluster to protect the
SVM root volume, which is a NetApp best practice for NAS-enabled SVMs. Also describes how
to quickly recover from volume failures or losses by promoting the SVM root volume from a
load-sharing mirror.
60
Related information
NFS management
NetApp Technical Report 4067: NFS Best Practice and Implementation Guide
/vol/vol1 -sec=sys,ro=@readonly_netgroup,rw=@readwrite_netgroup1:
@readwrite_netgroup2:@rootaccess_netgroup,root=@rootaccess_netgroup
To reproduce this export as a clustered export policy, you have to create an export policy with three
export rules, and then assign the export policy to the volume vol1.
62 | NFS Configuration Power Guide
-ruleindex 2
-protocol nfs
-rorule sys
-rwrule sys
-superuser sys
-ruleindex 3
-protocol nfs
-rorule sys
-rwrule sys
-superuser none
2. Create three rules with the following parameters to the base command:
• Base command:
vserver export-policy rule create -vserver NewSVM -policyname exp_vol1
• Rule parameters:
-clientmatch @readonly_netgroup -ruleindex 1 -protocol nfs -rorule sys
-rwrule never -superuser none
/vol/vol1/q_1472 -sec=sys,rw=host1519s,root=host1519s
/vol/vol1/q_1471 -sec=sys,rw=host1519s,root=host1519s
/vol/vol1/q_1473 -sec=sys,rw=host1519s,root=host1519s
/vol/vol1/q_1570 -sec=sys,rw=host1519s,root=host1519s
/vol/vol1/q_1571 -sec=sys,rw=host1519s,root=host1519s
/vol/vol1/q_2237 -sec=sys,rw=host2057s,root=host2057s
/vol/vol1/q_2238 -sec=sys,rw=host2057s,root=host2057s
/vol/vol1/q_2239 -sec=sys,rw=host2057s,root=host2057s
/vol/vol1/q_2240 -sec=sys,rw=host2057s,root=host2057s
/vol/vol1/q_2241 -sec=sys,rw=host2057s,root=host2057s
In ONTAP, one of two policies is needed for each qtree: one with a rule including -clientmatch
host1519s, or one with a rule including -clientmatch host2057s.
• [next 4 qtrees...]
• [next 4 qtrees...]
If you need to add additional qtrees for those hosts later, you would use the same export policies.
64
Copyright information
Copyright © 2018 NetApp, Inc. All rights reserved. Printed in the U.S.
No part of this document covered by copyright may be reproduced in any form or by any means—
graphic, electronic, or mechanical, including photocopying, recording, taping, or storage in an
electronic retrieval system—without prior written permission of the copyright owner.
Software derived from copyrighted NetApp material is subject to the following license and
disclaimer:
THIS SOFTWARE IS PROVIDED BY NETAPP "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL NETAPP BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
NetApp reserves the right to change any products described herein at any time, and without notice.
NetApp assumes no responsibility or liability arising from the use of products described herein,
except as expressly agreed to in writing by NetApp. The use or purchase of this product does not
convey a license under any patent rights, trademark rights, or any other intellectual property rights of
NetApp.
The product described in this manual may be protected by one or more U.S. patents, foreign patents,
or pending applications.
Data contained herein pertains to a commercial item (as defined in FAR 2.101) and is proprietary to
NetApp, Inc. The U.S. Government has a non-exclusive, non-transferrable, non-sublicensable,
worldwide, limited irrevocable license to use the Data only in connection with and in support of the
U.S. Government contract under which the Data was delivered. Except as provided herein, the Data
may not be used, disclosed, reproduced, modified, performed, or displayed without the prior written
approval of NetApp, Inc. United States Government license rights for the Department of Defense are
limited to those rights identified in DFARS clause 252.227-7015(b).
65
Trademark information
NETAPP, the NETAPP logo, and the marks listed on the NetApp Trademarks page are trademarks of
NetApp, Inc. Other company and product names may be trademarks of their respective owners.
http://www.netapp.com/us/legal/netapptmlist.aspx
66
Index
export policies 45
7-Mode exports LDAP client configurations 35
comparison with ONTAP exports 60 local UNIX groups 28
local UNIX users 27
A new LDAP client schema 33
NFS Kerberos realm configurations 41
about this guide NFS servers 20
deciding whether to use 5 NIS domain configuration 32
access SVMs 17
testing NFS client 55
See also permissions
access, NFS D
prerequisites for adding storage capacity to SVMs 45 definitions
access, NFS client verifying status of netgroup 31
verifying from the cluster 55 DES
adding configuring for NFS Kerberos 42
rules to export policies 46 DNS
users to local UNIX groups 28 configuring for host-name resolution using an
AES external DNS server 24
configuring for NFS Kerberos 42 documentation
aggregates how to receive automatic notification of changes to
assessing space before provisioning storage 6 66
assigning how to send feedback about 66
export policies to qtrees 54 domain configurations
audience creating NIS 32
for this guide 5
authentication
requirements for using Kerberos with NFS 39 E
enabling
C LDAP on SVMs 37
encryption types
CA certificates configuring for NFS Kerberos 42
installing self-signed root, on the SVM 34 examples
capacity, storage ONTAP export policy 61
prerequisites for adding to NFS-enabled SVMs 45 export policies
certificates, CA adding rules to 46
installing self-signed root, on the SVM 34 assigning to a volume 53
client access, NFS assigning to qtrees 54
verifying from the cluster 55 capability to enable configuration checking 52
client configurations creating 45
creating LDAP 35 defining for SVM root volumes 19
client schemas examples in ONTAP 61
creating new LDAP 33 introduction to securing NFS access using 52
client systems setting index numbers for rules 53
testing NFS access from 55 export policy rules
comments requirements for using netgroups to match clients 29
how to send feedback about documentation 66 exports
configuration worksheets comparison of 7-Mode and ONTAP 60
to gather NFS information 8 setting UNIX file permissions 55
configurations testing administrator access to 55
creating LDAP client 35 testing client access to 55
creating NFS Kerberos realm 41 verifying NFS client access from the cluster 55
creating NIS domain 32 exports, NFS
configuring introduction to differences between ONTAP and 7-
name service switch table 25 Mode 60
NFS access 6 external DNS servers
configuring NFS access configuring DNS for host-name resolution using 24
prerequisites for adding storage capacity to SVMs 45 external services
creating
68 | NFS Configuration Power Guide
R T
realm configurations
tables, name service switch
creating NFS Kerberos 41
configuring 25
root CA certificates
testing
installing on the SVM 34
NFS access by administrators 55
root volume protection
NFS access by client users 55
where to find additional information 58
See also verifying
rules
70 | NFS Configuration Power Guide
U V
UNIX verifying
adding users to local groups 28 NFS client access from the cluster 55
creating local groups 28 status of netgroup definitions 31
creating local users 27 volumes
loading local groups from URIs 29 assigning export policies to 53
loading local users from URIs 27 creating 50
local users and groups limits 26 volumes, new NFS
setting file permissions 55 deciding where to place 8
URIs
loading local UNIX groups from 29
loading local UNIX users from 27
W
loading netgroups into SVMs from 30 workflows
user authentication NFS configuration 6
requirements for using netgroups 29 workflows, NFS configuration
user information prerequisites for adding storage capacity to SVMs 45
configuring name service switch tables to retrieve 25
users