Professional Documents
Culture Documents
EXERCISE
In this exercise, you practice what you learned about file sharing. You create volumes, qtrees, and files,
export them, and mount them from a mountpoint on the NFS client. To complete this exercise, you must be
familiar with the exportfs, mount, mkdir, and cd commands. You can use the lecture notes for reference.
OBJECTIVES
TASK 1: MOUNT THE ROOT VOLUME OF THE STORAGE SYSTEM ON AN ADMINISTRATION HOST
In the previous exercise, you configured a UNIX or Linux host as an administration host. In this task, you
mount the root volume so that you can modify configuration files from the administration host.
STEP ACTION
1.
Launch NetApp System Manager and navigate to: Storage > Exports.
2.
Notice that the root volume has been exported by default, as you observed from the commandline interface in the previous exercise:
3.
E4-1
Accelerated NCDA Boot Camp Data ONTAP 7-Mode: Exports and Mounts
2011 NetApp, Inc. This material is intended only for training. Reproduction is not authorized.
STEP ACTION
4.
6.
7.
In this task, you create a new aggregate and volume and verify that the volume was exported automatically.
STEP ACTION
1.
Examine the contents of the /etc/exports file with the rdfile command.
system> rdfile /etc/exports
2.
How does the output of the exportfs command differ from the output of the rdfile
command?
_____________________________________________________________________________
_____________________________________________________________________________
3.
E4-2
Accelerated NCDA Boot Camp Data ONTAP 7-Mode: Exports and Mounts
2011 NetApp, Inc. This material is intended only for training. Reproduction is not authorized.
STEP ACTION
4.
5.
Use the rdfile and exportfs commands to verify that the flexible volume was created and
exported:
system> rdfile /etc/exports
system> exportfs
Note the access permissions for the exported volume and record them here:
_____________________________
In this task, you rename a volume that was automatically exported and verify the export after the renaming
operation. Then you mount the newly renamed volume from a host.
STEP ACTION
1.
Using the storage system command-line interface, rename the flexible volume that you created
from NFStest to NFSvol:
system> vol rename NFStest NFSvol
2.
Notice that the /etc/exports file has been modified and that the exports have been
automatically updated.
3.
4.
E4-3
Accelerated NCDA Boot Camp Data ONTAP 7-Mode: Exports and Mounts
2011 NetApp, Inc. This material is intended only for training. Reproduction is not authorized.
In this task, you create a qtree. You then export it by editing the /etc/exports file and reload the persisted
exports. You then mount the qtree export.
STEP ACTION
1.
Using the storage system command-line interface, create a qtree named unix_tree on NFSvol:
system> qtree create /vol/NFSvol/unix_tree
2.
3.
4.
If you are not at the vol0 mountpoint, change your directory to this location.
5.
6.
NOTE: If you are not familiar with this technique, refer to the following resource:
http://en.wikipedia.org/wiki/Vi
Your exports file is now available in the vi editor and the editor is in command mode.
7.
8.
Press Shift-A (capital A) to append to the end of the line you are currently on.
9.
10.
For UNIX_or_Linux_Host, provide your assigned UNIX or Linux host name or IP address.
11.
Press Esc to move out of append mode and back to command mode.
12.
13.
E4-4
Accelerated NCDA Boot Camp Data ONTAP 7-Mode: Exports and Mounts
2011 NetApp, Inc. This material is intended only for training. Reproduction is not authorized.
STEP ACTION
14.
Using the storage system command-line interface, run the following commands to export the
new entry to memory:
system> exportfs a
system> exportfs
15.
16.
17.
18.
19.
Verify that when you used the touch command, you created a new file:
# ls l
1.
2.
Use the subnet address of the current training environment, as well as the IP address of your
assigned UNIX host and the correct subnet mask, to export the qtree that you just created to the
subnet. Choose one of these two commands:
/vol/NFSvol/subnet -rw=current_subnet/24,root=current_subnet/24
or
/vol/NFSvol/subnet -rw="current_subnet
subnet_mask",root="current_subnet subnet_mask"
For example:
/vol/NFSvol/subnet -rw=10.10.10.0/24,root=10.10.10.0/24
or
/vol/NFSvol/subnet -rw="10.10.10.0 255.255.255.0", root="10.10.10.0
255.255.255.0"
3.
4.
E4-5
Accelerated NCDA Boot Camp Data ONTAP 7-Mode: Exports and Mounts
2011 NetApp, Inc. This material is intended only for training. Reproduction is not authorized.
STEP ACTION
5.
6.
Change the directory to the mountpoint and use the touch command to create a file named
subnet_file.
In this task, you identify targets and resources, create the /etc/netgroup file, create the
/etc/nsswitch.conf file, and verify the content of the /etc/rmtab and /etc/hosts files.
STEP ACTION
1.
Verify the existence of the file called netgroup in one of two ways.
Use either a UNIX or Linux host or the wrfile command to create three groups: trustedhosts,
untrustedhosts, and allhosts. Add your assigned UNIX administration host to the trustedhost
group and create other dummy hosts for the untrustedhosts group. Place trustedhosts and
untrustedhosts in the allhosts folder:
NOTE: Use the wrfile command sparingly. If the vi editor or other equivalent commands
are available, use them instead.
3.
Press Enter after the last line and then Ctrl-C to save the entries.
NOTE: If an error message is generated, disregard it.
E4-6
Accelerated NCDA Boot Camp Data ONTAP 7-Mode: Exports and Mounts
2011 NetApp, Inc. This material is intended only for training. Reproduction is not authorized.
STEP ACTION
4.
NOTE: It may take up to 60 seconds for modifications of the netgroup file to take effect.
5.
Verify that the rmtab file exists and identify the contents of the file in one of two ways:
NOTE: The rmtab file includes a list of all hosts mounted since the storage system was started.
6.
NOTE: The nsswitch.conf file contains information that defines the order in which
hostnames-to-IP-addresses, passwords, netgroups, and other configurations are resolved.
7.
9.
Export netgroupA to the trusted targets (the trustedhosts netgroup) with read-write permissions.
10.
Change the directory to the mountpoint and create a file named netgroup_file.
You have successfully exported a resource to a netgroup.
E4-7
Accelerated NCDA Boot Camp Data ONTAP 7-Mode: Exports and Mounts
2011 NetApp, Inc. This material is intended only for training. Reproduction is not authorized.
In this task, you export a qtree using NetApp System Manager and change the logical name of the export.
STEP ACTION
1.
2.
3.
Name: readTree
Volume: NFSvol
Enable oplocks: Cleared
Securtiy Style: unix
4.
5.
6.
Click Create.
The Create Export dialogue box appears:
Click Browse.
7.
E4-8
Accelerated NCDA Boot Camp Data ONTAP 7-Mode: Exports and Mounts
2011 NetApp, Inc. This material is intended only for training. Reproduction is not authorized.
STEP ACTION
8.
9.
Verify that the folder path to export is /vol/NFSvol/readTree and click OK.
10.
E4-9
Accelerated NCDA Boot Camp Data ONTAP 7-Mode: Exports and Mounts
2011 NetApp, Inc. This material is intended only for training. Reproduction is not authorized.
STEP ACTION
11.
In the Client Permissions session, click Edit, select All hosts, and Read-Only and Allow. Click
Save
12.
Verify that the permissions setting has been added to the Host permissions list:
E4-10
Accelerated NCDA Boot Camp Data ONTAP 7-Mode: Exports and Mounts
2011 NetApp, Inc. This material is intended only for training. Reproduction is not authorized.
STEP ACTION
13.
14.
Navigate to Storage > Shared Folders > Exports and identify the new export.
In this task, you mount the export that you created earlier in this exercise.
STEP ACTION
1.
Establish a PuTTY session to the administration host and create a directory for your storage
system.
2.
E4-11
Accelerated NCDA Boot Camp Data ONTAP 7-Mode: Exports and Mounts
2011 NetApp, Inc. This material is intended only for training. Reproduction is not authorized.
STEP ACTION
3.
Mount the storage system root volume to the readTree directory and view the contents (use the
storage system name or IP address):
# mount IP_address:/readTree /mnt/system_name/readTree
# cd /mnt/system_name/readTree
4.
You should now be able to view the directory structure of your storage system root volume:
# ls al /mnt/system_name/readTree
How does this path compare with the path of the local client root?
HINT: Use # ls al /.
______________________________________________________________
5.
E4-12
Accelerated NCDA Boot Camp Data ONTAP 7-Mode: Exports and Mounts
2011 NetApp, Inc. This material is intended only for training. Reproduction is not authorized.