Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a java app that accesses an NFS share with hard mount (soft mount does troubles i get many RPC timeout's for some reason). I'm on solaris. If i turn off (svcadm -v disable to the nfs server) then my java app gets stuck if doing

kill -3 myPID

returns nothing as my java process hangs - strange, why even kill -3 to get thread dump does not return? also i even had problems killing my process - its not something i want to do, i don't want my app to get stuck if the mount is down Anyone has a solution or can recommend what I should be doing? I would like to use maybe soft mounts the problem is that i get many RPC timeout while I try to copy files from one server to an nfs share.

 NFS write failed for server xx.xx.xx.xx: error 5 (RPC: Timed out)
 cp: /share/myfile.txt: Connection timed out

so because i'm getting these errors with soft mounts and it looks unreliable (its over tcp) then i wished to test hard mount but this makes my app stuck if the share is down for some reason.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Blocking-and-retrying-indefinitely is the very definition of a hard-mount. Passing the intr option to the mount command ought to at least allow you to interrupt the blockage when the mount is down, if I'm reading the docs correctly.

More details here.

share|improve this answer
    
How come all my threads get stuck?? I have many threads in the java app and only a few of them access the nfs share, how come also the other threads which have no connection to the nfs share also get stuck? how come soft mount is so unstable that I canno't even do ls to remote dirs and I get rpc timeout (from time to time). –  Tomer Mar 28 '11 at 11:00
    
I found the solution I needed to increase the NFS timeout, it was too small after increasing it problem with soft mount solved –  Tomer Mar 28 '11 at 16:47

Two problems there. For your app, get a stack trace from your threads and see where they are hanging. Perhaps they are indirectly touching something that depends on a NFS path (eg. is any NFS-mounted directories in your PATH variable?).

The RPC timeout could be caused by network instability, or your client overloading the server, etc. You'll have to investigate it carefully. Soft mounts over TCP work just fine and we use it extensively.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.