Network File System (NFS)
********************************
Hard Mount (Recommended)
=====================
If you have mounted the NFS filesystem using hard mount, it will repeatedly retry to contact the server. Once the server is back online the program will continue to execute undisturbed from the state where it was during server crash. We can use the mount option “intr” which allows NFS requests to be interrupted if the server goes down or cannot be reached. Hence the recommended settings are hard and intr options.
mount -o rw,hard,intr server1.example.com/home /nfs_share1
entry in fstab:
netapp01z:/vol/example_share /opt/example nfs _netdev,vers=3,rsize=32768,wsize=32768,hard,intr,retry=20,bg 0 0
Soft Mount (Not Recommended)
========================
Suppose you have mounted a NFS filesystem using “soft mount” . When a program or application requests a file from the NFS filesystem, NFS client daemons will try to retrieve the data from the NFS server. But, if it doesn’t get any response from the NFS server (due to any crash or failure of NFS server), the NFS client will report an error to the process on the client machine requesting the file access. The advantage of this mechanism is “fast responsiveness” as it doesn’t wait for the NFS server to respond. But, the main disadvantage of this method is data corruption or loss of data. So, this is not a recommended option to use.
mount -o rw,soft server1.example.com/home /nfs_share1
hard or soft — Specifies whether the program using a file via an NFS connection should stop and wait (hard) for the server to come back online, if the host serving the exported file system is unavailable, or if it should report an error (soft).
If hard is specified, the user cannot terminate the process waiting for the NFS communication to resume unless the intr option is also specified.
If soft is specified, the user can set an additional timeo=<value> option, where <value> specifies the number of seconds to pass before the error is reported.
Note:
====
Using soft mounts is not recommended as they can generate I/O errors in very congested networks or when using a very busy server.
intr — Allows NFS requests to be interrupted if the server goes down or cannot be reached.
********************************
Hard Mount (Recommended)
=====================
If you have mounted the NFS filesystem using hard mount, it will repeatedly retry to contact the server. Once the server is back online the program will continue to execute undisturbed from the state where it was during server crash. We can use the mount option “intr” which allows NFS requests to be interrupted if the server goes down or cannot be reached. Hence the recommended settings are hard and intr options.
mount -o rw,hard,intr server1.example.com/home /nfs_share1
entry in fstab:
netapp01z:/vol/example_share /opt/example nfs _netdev,vers=3,rsize=32768,wsize=32768,hard,intr,retry=20,bg 0 0
Soft Mount (Not Recommended)
========================
Suppose you have mounted a NFS filesystem using “soft mount” . When a program or application requests a file from the NFS filesystem, NFS client daemons will try to retrieve the data from the NFS server. But, if it doesn’t get any response from the NFS server (due to any crash or failure of NFS server), the NFS client will report an error to the process on the client machine requesting the file access. The advantage of this mechanism is “fast responsiveness” as it doesn’t wait for the NFS server to respond. But, the main disadvantage of this method is data corruption or loss of data. So, this is not a recommended option to use.
mount -o rw,soft server1.example.com/home /nfs_share1
hard or soft — Specifies whether the program using a file via an NFS connection should stop and wait (hard) for the server to come back online, if the host serving the exported file system is unavailable, or if it should report an error (soft).
If hard is specified, the user cannot terminate the process waiting for the NFS communication to resume unless the intr option is also specified.
If soft is specified, the user can set an additional timeo=<value> option, where <value> specifies the number of seconds to pass before the error is reported.
Note:
====
Using soft mounts is not recommended as they can generate I/O errors in very congested networks or when using a very busy server.
intr — Allows NFS requests to be interrupted if the server goes down or cannot be reached.
No comments:
Post a Comment