NFS(Network File System)

Saturday, August 8, 2009 at 9:09 AM

About NFS

NFS, as implemented in the SunOS and Solaris operating systems. It isintended as both an introduction to NFS and as a guide to the mostCommon problems. There are many more complete references to NFS, a fewof which are noted in section 7.4 and 7.5.

Understanding NFS:

The NFS SERVER is th e machine that makes file systems available to the network. It does so by either EXPORTING (SunOS term) or SHARING(Solaris term) them.
The NFS CLIENT is the machine that accesses file systems that havebeen made available. It does so by MOUNTING them.

Different daemons are involved with NFS:

RPC.MOUNTD only runs on NFS servers. It answers initial requests fromclients for file systems. NFSD runs on NFS servers. They are the daemons that dealwith the majority of the client NFS requests.
On SunOS 4.1.X, BIODS (block I/O daemons) help clients withtheir NFS requests. These do not exist on Solaris 2.X.
LOCKD and STATD are a set of daemons that keep track of locks on NFSfiles. There will typically be a set of daemons running on a clientand server.
NFS partitions can be mounted in one of two ways, hard or soft.

HARD MOUNTS are permanent mounts designed to look just like anynormal, local file system. If a partition that is hard mounted becomesunavailable, client programs will keep trying to access it forever.This will cause local processes to lock when a hard mounted disk goesaway. Hard mounts are the default type of mount.

SOFT MOUNTS will fail after a few retries if a remote partitionbecomes unavailable. This is a problem if you are writing to thepartition, because you can never be sure that a write will actuallyget processed on the other hand, your local processes will not lockup if that partition does go away. In general, soft mounts should onlybe used if you are solely reading from a disk and even then it shouldbe understood that the mount is an unreliable one. If you soft mount apartition that will be written to, you are nearly guaranteeing thatyou will have problems.

Number of files related to NFS:
/etc/exports (SunOS) or /etc/dfs/dfstab (Solaris) lists which files toexport on a Server. These file are maintained by hand.
/etc/xtab (SunOS) or /etc/dfs/sharetab (Solaris) lists the filesystemsthat actually are currently exported. They are maintained by exportfsand share, respectively.
/etc/rmtab on a server lists filesystems that are remotely mounted byclients. This file is maintained by rpc.mountd.
/etc/fstab (SunOS) or /etc/vfstab (Solaris) lists which files to mounton a client. These files are maintained by hand.
/etc/mtab (SunOS) or /etc/mnttab (Solaris) on a client listsfilesystems which are currently mounted onto that client. The mountand umount commands modify this file.

0 comments

Post a Comment

Solaris | Powered by Blogger | Entries (RSS) | Comments (RSS) | Designed by MB Web Design | XML Coded By Cahayabiru.com