Saturday, 11 August 2012

NFS: Network File System


NFS: Network File System
NFS is a widely used protocol for sharing files across networks.  It is designed to be stateless to allow for easy recovery in the event of server failure.
As a file server, the storage system provides services that include mount daemon (mountd) , Network lock Manager(nlm_main), Network file system daemon(nfsd), status monitor(sm_l_main), quota daemon (rquot_l_main), and portmap or rpcbind. Each of these services is required for a successful operation of an NFS process.
By updating the /etc/fstab file for persistent mounting of the file system across reboots. And we can mount by running the automounter services that mounts the file system on demand and unmounts the file if they are not accessed within a few minutes.
What does it mean for a protocol to be stateful or stateless?
If a protocol is stateless, it means that it does not require that the server maintain any session state between messages; instead, all session states are maintained by the client. With a stateless protocol, each request from client to server must contain all of the information necessary to understand the request and cannot take advantage of any stored context on the server. Although NFS is considered a stateless protocol in theory, it is not stateless in practice.
NIS: Network information service: Provide a simple network lookup service consisting of database and processes. Its purpose is to provide information that has to be known throughout the network, to all machines on the network. Information likely to be distributed by NIS is:
1.       Login names/passwords/home directories (/etc/passwd)
2.       Group information(/etc/group)
3.       Host names and IP numbers(/etc/hosts)
Some of the command in netapp storage for troubleshooting the NIS.
1.       Ypcat mapname: prints all of the values in the NIS map, which is provided.
2.       Ypgroup : Displays the group file entries that have been locally cached from the NIS server.
3.       Ypmatch key mapname: prints every value in the NIS map mapname whose key matches one of the keys given.
4.       Ypwhich : prints the name of the current NIS server if NIS is enabled.
Some cmd for the troubleshooting the NFS
1.       Keep “options nfs.export.auto –update in on mode” so that /etc/exports file is automatically updated when volume is created, renamed, destroyed.
2.       exportfs : Display all current exports in memory.
3.       exportfs  –p [options] path : Adds exports to the /etc/export file and in memory.
4.       exportfs  –r :reloads only exports from /etc/exports files
5.       exportfs  –uav :unexports all export
6.       exportfs  –u  [path]: unexport a specific export
7.       exportfs   -z [path]: unexports an export and removes it from /etc/exports
8.       exportfs   -s pathname: To verify the actual path to which a volume is exported.
9.       exportfs   -q pathname: Display export options per file system path
NOTE: Be careful not to export resources with the -anon option. If NFS is licensed on the storage system, and you specify exports with the -anon option, everyone is able to mount the resource and could cause the security risk.
WAFL credential cache
The wafl credential cache(WCC) contains the cached user mappings for the unix user identities(UID andGID) to windows identities (SID for users and groups).After a UNIX-to-Windows user mapping is performed (including group membership) the result are stored in the WCC.
The wcc command does not look in the WCC , but performs a current user mapping operation and display the result . This command is useful for troubleshooting user mapping issues.
NOTE: the cifs.trace_login options must be enabled.
To troubleshoot the NFS performance issues some data collections cmd.
1.       nfsstat: display statistical information about NFS and remote procedure call(RPC) for storage system .
Syntax: nfstat   <interval>  [ip_address |name] {-h , -l , -z , -c , -t, -d, -C}
Can display interval or continuous display of statistics summary.
Perclient stats can be collected and display via nfs.per_client_stats.enable
If optional IP address or host name is specified with –h option, that client’s statistic are displayed.
nfsstat output with –d:  The nfsstat  -d command display reply cache statistics as well as incoming messages, include allocated mbufs. This diagnostic option allow for debugging of all NFS-related traffic on the network.
2.       NFS mount Monitoring: nfs mountd traces enables tracing of denied mount request against the storage system.
Enable option only during debug session as there is a possibility of numerous syslog hits during DOS attacks.
Enter the following cmd
Options nfs .mounted.trace on


No comments:

Post a Comment