Вы находитесь на странице: 1из 28

NFS

Module 9 Data ONTAP 7.3 Fundamentals

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 Add an export for an adminhost
2008 NetApp. All rights reserved. 2

NFS Overview

2008 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

2008 NetApp. All rights reserved.

Exported Resources Overview


SS1

vol0

flexvol1 data_files etc home eng_files misc_files

Network Connection

Client1

Client1

2008 NetApp. All rights reserved.

Setting Up and Configuring NFS

2008 NetApp. All rights reserved.

Setting up NFS
Configure NFS using either:
The CLI FilerView

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

2008 NetApp. All rights reserved.

Configuring NFS Using the CLI


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

2. Set NFS options:


options nfs

2008 NetApp. All rights reserved.

Configuring NFS Using FilerView


To configure NFS using FilerView: FilerView > NFS > Configure

2008 NetApp. All rights reserved.

Exporting Resources

2008 NetApp. All rights reserved.

10

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 -a command Use FilerView

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

2008 NetApp. All rights reserved.

11

Adding an Export: /etc/exports


Specifies the full path to the directory that is exported. 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.

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

This option gives root permissions for the pubs directory to host1.

All hosts can mount the /vol/vol0/home directory as read-write if an option is not specified.

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

2008 NetApp. All rights reserved.

12

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=adminhost,root=adminhost

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.

2008 NetApp. All rights reserved.

13

Exporting

2008 NetApp. All rights reserved.

16

The exportfs Command


After adding an export to /etc/exports, use the exportfs -a command to load the exports.
system> exportfs -a

system> exportfs /vol/flexvol/qtree /vol/vol0/home

-sec=sys,rw=10.254.232.12 -sec=sys,rw,root=10.254.232.12,nosuid

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>

2008 NetApp. All rights reserved.

17

Adding an Export Using FilerView

2008 NetApp. All rights reserved.

18

Adding an Export Using FilerView (Cont.)

2008 NetApp. All rights reserved.

19

Adding an Export Using FilerView (Cont.)

2008 NetApp. All rights reserved.

20

Managing NFS Exports

2008 NetApp. All rights reserved.

21

Temporary Exports
Use the exportfs command to create in-memory exports:
exportfs -i -o

Example:
exportfs -i -o ro=host1 /vol/vol0/home
NOTE: When the storage system reboots, this export will be gone.

2008 NetApp. All rights reserved.

22

Common exportfs Options


Display all current exports:
exportfs

Add exports to the /etc/exports file:


exportfs -p [options] path

Reload exports from /etc/exports files:


exportfs -r

Unload all exports:


exportfs -uav

Unload a specific export:


exportfs -u [path]

Unload an export and remove it from /etc/exports


exportfs -z [path]
2008 NetApp. All rights reserved. 23

Mounting

2008 NetApp. All rights reserved.

24

Mounting From a Client


To mount an export from a client: 1. Telnet or log in to the host. 2. Create a directory as a mountpoint for the storage appliance. 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-vol2 (2) # mount system:/vol/vol2 /system-vol2 # cd /system-vol2 (4) NetApp1-vol2$ ls l (5) -rwxr-xr-x root 719634 FEB 11 2004 -rwxr-xr-x root 719634 FEB 13 2004

(3)

,general ,policy

2008 NetApp. All rights reserved.

25

Other NFS Administration Resources


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

2008 NetApp. All rights reserved.

26

Module Summary
In this module, you should have learned to: NFS is a protocol used by Data ONTAP to network computers. The /etc/exports file defines exports.
You can configure NFS on a storage system using the CLI or FilerView. After you export a resource, you can mount an exported file system on a UNIX host.

2008 NetApp. All rights reserved.

27

Exercise
Module 9: NFS Estimated Time: 45 minutes

Answers
Module 9: NFS

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

2008 NetApp. All rights reserved.

30

Вам также может понравиться