open NFS file without block - NFS
This is a discussion on open NFS file without block - NFS ; 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
...
-
open NFS file without block
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
-
Re: open NFS file without block
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