Cheng Huang wrote:
> If the network connection could be down for the NFS mount, how can I open
> a NFS file without being blocked?
>
> I tried to use
> open("...", O_RDWR|O_NONBLOCK);
> which times out after a fairly LONG period even when I mount with
> soft option (also, timeo=1,retrans=0,retry=1).
>
> Is there a way to get immediate (nonblock) fail notice if the network is
> disconnected? Thanks.
>
> -- Cheng
Did you try to mount the nfs share in nonblock mode? There is an mount
option for this, see man nfs.
- Sascha
|