[mythtv-users] NFS settings
mythtv at ultratux.org
Fri Oct 8 21:25:47 UTC 2004
On Friday 08 October 2004 22:29, Joby Walker wrote:
> Yeah, saw that (I should have mentioned that), but there isn't any
> explanation of the settings. I was wondering if people used different
> settings to effect. 21.9 recommends "soft" mounting, while the NFS
> documentation recommends "hard,intr".
I very strongly recommend the "hard,intr" setting. And here's why:
If you do not use the "hard,intr" setting, any loss of connection to the NFS
server (ethernet malfunction, crash, etc.) will result in every process that
accesses that resource hanging and you being UNable to kill it.
Run 'df' on such a client and the 'df' process will hang. Worse yet, Control-C
will not work. Open another terminal and issue a 'kill -9' signal to that
'df' command and that 'kill' process will hang, too. Indefinitely. ( etc. )
Well you get the idea. The only way out of that is bring the NFS server back
up, or reboot the client.
Trust me on this, this is not you want.
For example, I had this bad setting on my laptop at the beginning. Now
imagine what happened if I forgot to umount the NFS share prior to taking it
with me on the road... Yep, only a full reboot could fix things. Not pretty.
Therefore, if you use the 'hard' setting, do not omit the 'intr' setting, as
it will enable you to kill tasks that hang on the missing NFS mount.
Hearing this, you might think "so 'soft' is a better option all around". Uhm,
no, read on. The 'soft' option suffers none of these issues as commands will
time-out after a while returning control to the application. However, the
'soft' option can lead to other big problems, from the application crashing
because it cannot cope well with the I/O error, up to and including
filesystem corruption. This is why 'soft' is definitely not recommended.
For a more authoritative look, here's what the NFS-HOWTO has to say about it:
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.
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.
And about the other thing, the "rsize=8192,wsize=8192" is common advice so
unless you have a real good reason to choose differently, go with that.
Linux: Because rebooting is for adding hardware.
More information about the mythtv-users