Wednesday, 1 May 2013

NFS Mounting options -Soft v/s Hard Mounting

Soft v/s Hard Mounting

There are some options which govern the way the NFS client handles a server crash or network outage. one of the cool things about NFS is that it can handle this gracefully if you set up the client right. There are two distinct failure modes:

If a file request fails, the NFS client will report an error to the process on thee client machine requesting the file access.


The programme accessing a file on a NFS mounted file system will hang when the server crashes. The process cannot be interrupted or killed (except be a "sure kill") unless you also specify intr. When the NFS server is back online the program will continue undisturbed from where it was. We recommend using hard,intr on all NFS mounted file systems.

Device    mountpoint fs-type   options      dump  fsckorder

Host:/home /home1     nfs     rw,hard,intr    0      0

Setting block size to optimize transfer speed

The rsize and wsize mount options specify the site of the chunks of data that the client and server pass back and forth to each other.

rsize = n will set the NFS read buffer size to n bytes

        (default is 4096)
wsize - n will set the NFS write buffer size to n bytes(")

While mounting manually the mount options can be specified as below
# mount -t nfs /home1 -o rsize=8292,wsize=8192,hard,intr,nolock

nolock disables NFS locking and stops the statd and lockd daemons and lock will enable it.

No comments:

Post a Comment