Difference between Soft Mount & Hard Mount
The directory /nfs should be created in your node/server. The nfs
mount can be mount as a “soft mount” or
as a “hard mount” these mount option
define the how the nfs client should be handle nfs crash/failure. We will see the difference between hard mount
and soft mount.
Soft mount:-
suppose you have mount the nfs by using “soft
mount’ when a program request a file from nfs server. Nfs demon will try to
retrieve the data from the nfs server. If doesn’t get any response from nfs server
due to some failure or crash on nfs server.
Then nfs client report an error to the process on the client machine requesting
the file access the Advantage “fast
responsiveness” it doesn’t wait to the nfs server to respond. The
Main Disadvantage of this method is
data corruption or loss of data so this is not the recommended option to use.
[root@sadeek ~]#
showmount -e 172.28.50.109
Export list for 192.168.0.105:
/nfs *
Soft mounting (Temporary
Mounting):-
[root@sadeek ~]# mount 172.28.50.109:/nfs/
/mnt/
Hard mounting:-if
you have mounted the nfs by “hard mount”. It will repeatly try to connect to the server.
Once the server is back online the program will continue to execute undisturbed
the state where it was during the crash. We can use the mount option “intr’
which allows nfs request to interrupt if the server goes down or cannot be access
able.
Hard Mount (Permanent
mounting):-
[root@sadeek~]# mount -o rw,hard,intr 172.28.50.109/nfs /mnt
[root@sadeek ~]# vim /etc/fstab
172.28.50.109:/nfs
/mnt
nfs Defaults 0 0
:wq!
We can check nfs share with the help of below mention
command.
[root@sushee ~]# mount –a
great
ReplyDeleteThanks for the tutorial, want to know how data gets corrupted in soft mount.
ReplyDelete