You are on page 1of 31

NFS

Module 7 Data ONTAP 8.0 7-Mode Administration

Module Objectives
By the end of this module, you should be able to: Explain NFS implementation in Data ONTAP License NFS on a storage system Explain the purpose and format of /etc/exports
List and define the export specification options Explain the rules for exports Describe the use of the exportfs command Mount an export on a UNIX host

2009 NetApp. All rights reserved.

NFS Overview

2009 NetApp. All rights reserved.

NFS Overview
NFS allows network systems (clients) to share files and directories that are stored and administered centrally from a storage system The following platforms usually support NFS:
Sun Microsystems Solaris Linux HP-UX And more

2009 NetApp. All rights reserved.

Exported Resources Overview


Storage System

vol0

flexvol1 data_files etc home eng_files misc_files

Network Connection

Client1

Client1

2009 NetApp. All rights reserved.

Setting Up and Configuring NFS

2009 NetApp. All rights reserved.

Setting up NFS
Configure NFS using either:
CLI NetApp System Manager

When setting up NFS, you must have:


An NFS license code Determined if you are enabling NFS over TCP, UDP, or both Determined which version of NFS to enable

2009 NetApp. All rights reserved.

CLI: NFS Setup


To use the CLI to configure NFS on a storage system, complete the following steps:
License NFS on the storage system:
license add <nfslicensecode> Executing this command starts the rpc.mountd and nfsd daemons.

Set NFS options:


options nfs

2009 NetApp. All rights reserved.

System Manager: NFS Setup

To configure licenses

Enter the NFS license code

2009 NetApp. All rights reserved.

System Manager: NFS Setup (Cont.)

The newly added license code Exports Added

2009 NetApp. All rights reserved.

Exporting Resources

2009 NetApp. All rights reserved.

Exporting Resources
To make resources available to remote clients, the resource must be exported
To export a resource persistently:
Edit the /etc/exports file with new entry Execute the exportfs -p command Use NetApp System Manager

To export a resource temporarily, use the exportfs -i -o command

2009 NetApp. All rights reserved.

Adding an Export: /etc/exports


The first option is listed following a dash. Additional options are separated by commas. In this example the rw option allows host1 and host2 to mount the pubs directory. Host names are listed separated by colons

Specifies the full path to the directory that is exported

/vol/vol0/pubs -rw=host1:host2,root=host1 /vol/vol1 -rw=host2 /vol/vol0/home

This option gives host1s root user has root access

All hosts can mount the /vol/vol0/home directory as readwrite if an option is not specified
2009 NetApp. All rights reserved.

This option gives read-write permissions to host2 only. All other hosts have no access

Test Your Knowledge


1. Allow root access to /vol/vol0 by adminhost
/etc/exports a. b. /vol/vol1 -rw=host2 /vol/vol0 -rw=adminhost,root=adminhost /vol/vol0/home -rw=host1:host2 /vol/vol0 -ro=host2 /vol/vol1 -rw=host1,ro=host3 /vol/vol1 rw=host1,root=host3 /vol/vol0/home rw=host1,ro=host2 /vol/vol0 ro=adminhost2,root=adminhost2

2. Allow read-write access to /vol/vol0/home by host1 and host2 3. Allow read-write access to /vol/vol1 by host1 and read-only access by host3

c. d. e. f. g. h.

2009 NetApp. All rights reserved.

Exporting

2009 NetApp. All rights reserved.

The exportfs Command


After adding an export to /etc/exports, use the exportfs -a command to load the export
system> rdfile /etc/exports
#Auto-generated by setup Mon Apr 30 08:32:21 GMT 2007 /vol/flexvol/qtree -sec=sys,rw=10.254.232.12 /vol/vol0/home -sec=sys,rw,root=10.254.232.12,nosuid system> exportfs system> system> exportfs -a exportfs

/vol/flexvol/qtree -sec=sys,rw=10.254.232.12 /vol/vol0/home -sec=sys,rw,root=10.254.232.12,nosuid

2009 NetApp. All rights reserved.

Temporary Exports
Use the exportfs command to create inmemory exports:
system> exportfs -i -o

Example:
system> exportfs -i -o ro=host1 /vol/vol0/home

NOTE: When the storage system reboots, this export will be gone

2009 NetApp. All rights reserved.

Common exportfs Options


Display all current exports:
system> exportfs

Add exports to the /etc/exports file:


system> exportfs -p [options] path

Reload exports from /etc/exports files:


system> exportfs -r

Unload all exports:


system> exportfs -uav

Unload a specific export:


system> exportfs -u [path]

Unload an export and remove it from /etc/exports


system> exportfs -z [path]
2009 NetApp. All rights reserved.

System Manager: Exporting

Current /etc/exports file To configure exports

2009 NetApp. All rights reserved.

System Manager: Exporting (Cont.)

2009 NetApp. All rights reserved.

System Manager: Exporting (Cont.)

2009 NetApp. All rights reserved.

System Manager: Exporting (Cont.)

2009 NetApp. All rights reserved.

System Manager: Exporting (Cont.)

2009 NetApp. All rights reserved.

System Manager: Exporting (Cont.)

The newly added export

2009 NetApp. All rights reserved.

System Manager: Exporting (Cont.)

anon applies only to root users

anon=0 (root) anon=65535 (deny access to root users)


2009 NetApp. All rights reserved.

anon=65534 (nobody)

Mounting

2009 NetApp. All rights reserved.

Mounting From a Client


To mount an export from a client:
1. Establish a Telnet session or log in to the host 2. Create a directory as a mountpoint for the storage system 3. Mount the exported directory in the host directory you just created 4. Change directories to the mounted export 5. Enter ls l to verify that the storage appliance is mounted and accessible
telnet 10.32.30.20 (1)

# mkdir /system-vol1-qt1 (2) # mount system:/vol/vol1/qtree1 /system-vol1-qt1 # cd /system-vol1-qt1 (4) # ls l (5) -rwxr-xr-x root 719634 FEB 11 2004 ,general -rwxr-xr-x root 719634 FEB 13 2004 ,policy

(3)

2009 NetApp. All rights reserved.

Other NFS Administration Resources


For more information about NFS administration, see Data ONTAP NFS Administration This advanced course covers:
Exporting resources across domains, subnets, and netgroups Advanced configuration NFS statistics gathering NFS performance tuning NFS troubleshooting

2009 NetApp. All rights reserved.

Module Summary
In this module, you should have learned to: Explain NFS implementation in Data ONTAP License NFS on a storage system Explain the purpose and format of /etc/exports
List and define the export specification options Explain the rules for exports Describe the use of the exportfs command Mount an export on a UNIX host

2009 NetApp. All rights reserved.

Exercise
Module 7: NFS Estimated Time: 45 minutes

Check Your Understanding


What does NFS stand for?
Network File System

What is the format for the /etc/exports file?


path -{export_option}

What is the purpose of export options?


To set access rights and host access

What command would you use to view what is exported from the storage appliance?
exportfs

2009 NetApp. All rights reserved.

You might also like