Sun Microsystems, Inc.  Oracle System Handbook - ISO 7.0 May 2018 Internal/Partner Edition
   Home | Current Systems | Former STK Products | EOL Systems | Components | General Info | Search | Feedback

Asset ID: 1-71-456246.1
Update Date:2018-02-02
Keywords:

Solution Type  Technical Instruction Sure

Solution  456246.1 :   How To Configure NFSv4  


Related Items
  • Linux OS
  •  
  • Exalogic Elastic Cloud X5-2 Eighth Rack
  •  
Related Categories
  • PLA-Support>Infrastructure>Operating Systems and Virtualization>Operating Systems>Oracle Linux
  •  
  • _Old GCS Categories>Infrastructure>LinuxOS>Storage>NFS
  •  




In this Document
Goal
Solution
 NFSv4 New Features
 How to Configure NFSv4
References


Applies to:

Linux OS - Version 2.6 to 2.6
Exalogic Elastic Cloud X5-2 Eighth Rack
Linux x86
Linux x86-64
Linux Kernel - Version: 2.6 to 2.6

***Checked for relevance on 12-Apr-2013***

Goal

This document simply introduces some NFSv4 new features and provides a step-by-step configuration of NFSv4 on Linux.

Solution

NFSv4 New Features

File system name space
NFSv4 provides a different model file system name-space model than did previous versions. Servers, rather than exporting multiple file systems, export a single "pseudo file system," formed from multiple actual file systems, and potentially customized for each client.

NFSv4 as a stateful protocol
Previous NFS protocols were stateless in the sense that the NFS server maintained no information or state about its clients.NFSv4, however, is stateful; the NFSv4 server maintains information about its clients, the files they hold open, and locks.Using stateful design enhance performance and scalability.

Delegation
Clients may perform operations on files with minimal interaction with the server. NFSv4 introduces file delegation. An NFSv4 server can allow an NFSv4 client to access and modify a file in it's own cache without sending any network requests to the server, until the server indicates via a callback that another client wishes to access a file. This reduces the amount of traffic between NFSv4 client and server considerably in cases where no other clients wish to access a set of files concurrently.

Security
A strong security model is mandated, where client/server interactions are done using the GSS-API framework. Three security mechanisms are needed: Kerberos, LIPKEY, and SPKM-3. Which one is actually used is negotiated between client and server. Security principals are now given as strings (e.g., user@domain) rather than as user IDs as was done in the earlier versions. Authorization uses both standard UNIX-like permissions as well as Windows ACLs.

There are other new features in NFSv4 besides the above, please follow Reference links.

How to Configure NFSv4

NFSv4 is supported on 2.6 kernel. Please install latest NFS package beforehand, to do NFSv4 configuration.

# cat /boot/config-2.6.9-42.EL|grep NFS
  ...
CONFIG_NFS_V4=y
  ...
CONFIG_NFSD_V4=y
# rpm -qa|grep nfs-utils
nfs-utils-1.0.6-70.EL4(provides a daemon for the kernel NFS server and related tools)
nfs-utils-lib-1.0.6-3(Support libaries that are needed by the commands and daemons)


NFSv4 configuration is quite simple if Security(KRB5) is not required. (Another Note to be written to introduce NFSv4 with Kerberos5 authentication).
Please have a look to next notes to get more info about NFS configuration:
<Note 237871.1>How to Enable NFS on RedHat Linux Advanced Server
<Note 199621.1> How to export a mount point on LINUX

NFSv4 configuration:
On server side:
1.Create /export
A NFSv4 server can only provide/export a single, hierarchical file system tree.

# mkdir /export
# chmod a+rwxt /export

2.Edit /etc/exports

/export *(rw,fsid=0,insecure)

where:
fsid=0 - only export one directory with the fsid=0 option. /export folder will be the root of the NFSv4 share.
Insecure - The insecure option in this entry also allows clients with NFS implementations that don't use a reserved port for NFS.

NOTE:
The /export directory will then be seen as the root directory for the NFSv4 filesystem. With NFS v4 all of the exports are contained within this filesytem and must be subdirectories of this root directory. If these were other directories/partitions that needed to be exported, directories/partitions are required to bind to /export folder. please refer <note 457201.1>

3.Start daemons

# rpc.idmapd
# /etc/init.d/nfs restart

where
rpc.idmapd — rpc.idmapd is the NFSv4 ID <-> name mapping daemon. It provides functionality to the NFSv4 kernel client and server, to which it communicates via upcalls, by translating user and group IDs to names, and vice versa. This daemon is also started when issuing "/etc/init.d/nfs start".

on client side:
1.Start idmap daemon

# rpc.idmapd       

2.Mount to server
mount the root of the NFSv4 server's share (/export) as "/".

# mount -t nfs4 yourserver:/ /mnt/nfs4/

References

<NOTE:199621.1> - How to export a mount point on LINUX (SUSE &UnitedLinux)
<NOTE:237871.1> - How to Enable NFS on RedHat Linux Advanced Server (RHAS)
<NOTE:457201.1> - Migration from NFSv3 to NFSv4

Attachments
This solution has no attachment
  Copyright © 2018 Oracle, Inc.  All rights reserved.
 Feedback