1830048 Members
21617 Online
109998 Solutions
New Discussion

soft Vs Hard mount

 
Chakravarthi
Trusted Contributor

soft Vs Hard mount

Hi,

which mount to use if i dont want my df and ls commands to hand when the nfs server is not responding

regards
chakri
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: soft Vs Hard mount

This document,

http://www.tldp.org/HOWTO/NFS-HOWTO/index.html

In the mount section explains some of the implications of this choice.

I think you want to go with soft to accomplish your goal.

Obviously you should run a test and make sure nothing unusual happens.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
David Child_1
Honored Contributor

Re: soft Vs Hard mount

Here is some info I found:

soft
If a file request fails, the NFS client will report an error to the process on the client machine requesting the file access. Some programs can handle this with composure, most won't. We do not recommend using this setting; it is a recipe for corrupted files and lost data. You should especially not use this for mail disks --- if you value your mail, that is.

hard
The program accessing a file on a NFS mounted file system will hang when the server crashes. The process cannot be interrupted or killed (except by 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.

David
Andrew Cowan
Honored Contributor

Re: soft Vs Hard mount

You should always bear in mind when you want this mountpoint to be available and what will happen when it isn't? A hard mount is always preferable in a "stable" environment, however you can still fall foul of a dae-lock situation whereby servers can't be rebooted because they're waiting for a mount to become available upon the other. You can set the "interrupt" option to get out of this, however you will still have to be there.

Which-ever way you decide I would never automatically mount an NFS share as part of your boot sequence, and use a script instead. If it is part of a cluster make it an application.
R. Sri Ram Kishore_1
Respected Contributor

Re: soft Vs Hard mount

Hi,

Take a look at this thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=682354

And, this is what the mount_nfs(1M) manpage says:
---
Hard versus Soft
File systems that are mounted read-write or that contain executable files should always be mounted with the hard option. Applications using soft mounted file systems may incur unexpected I/O errors, file corruption, and unexpected program core dumps. The soft option is not recommended.
---

HTH.
Regards,
Sri Ram
"What goes up must come down. Ask any system administrator."