* disabling caching
@ 2006-07-14 8:12 Stefan Palme
2006-07-14 9:26 ` Frank van Maarseveen
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Palme @ 2006-07-14 8:12 UTC (permalink / raw)
To: nfs
Hello,
I have a ext3-directory exported via NFS to a second linux (2.6.x) box.
This first (exporting) host is a linux-2.6.x host, too.
An application on that second box tries to open a file in that
directory. When this fails, it causes the exporting linux box to
create the missing file (via an application-internal RPC call).
After that RPC call the second linux box tries again to read
this file. Although the file now exists, the open() call still
returns "no such file or directory". This second try is much
less than one second after the first try.
After a few seconds, the open() call on the second box succeeds.
So I guess that caching is the reason for the second open()-call
to fail.
Is there a way to make the second call to open() succeed?
Thanks i.a.
regards
-stefan-
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: disabling caching
2006-07-14 8:12 disabling caching Stefan Palme
@ 2006-07-14 9:26 ` Frank van Maarseveen
2006-07-14 9:44 ` Stefan Palme
0 siblings, 1 reply; 9+ messages in thread
From: Frank van Maarseveen @ 2006-07-14 9:26 UTC (permalink / raw)
To: Stefan Palme; +Cc: Linux NFS mailing list
On Fri, Jul 14, 2006 at 10:12:32AM +0200, Stefan Palme wrote:
>
> After a few seconds, the open() call on the second box succeeds.
> So I guess that caching is the reason for the second open()-call
> to fail.
You might want to try (1) and/or ((2) or (3)) on the NFS client:
(1) On the NFS client, put this before the open():
close(open("whatever", O_WRONLY|O_CREAT, 0666));
unlink("whatever");
(2) Try the "noac" nfs mount option, it'll cost performance though.
(3) Another solution might be to use the patch at www.frankvm.com/nfs-noac
to selectively disable attribute caching (see the README). It's a trick
I use for some distributed work.
--
Frank
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: disabling caching
2006-07-14 9:26 ` Frank van Maarseveen
@ 2006-07-14 9:44 ` Stefan Palme
2006-07-14 12:17 ` Stefan Palme
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Palme @ 2006-07-14 9:44 UTC (permalink / raw)
To: Linux NFS mailing list
Thanks. Variant (1) is not possible for me, because I can't modify
the application in question. Variant (2) may be exactly what I have
searched for (but did not read "man nfs" down to the end :-)
regards
-stefan-
> On Fri, Jul 14, 2006 at 10:12:32AM +0200, Stefan Palme wrote:
> >
> > After a few seconds, the open() call on the second box succeeds.
> > So I guess that caching is the reason for the second open()-call
> > to fail.
>
> You might want to try (1) and/or ((2) or (3)) on the NFS client:
>
> (1) On the NFS client, put this before the open():
>
> close(open("whatever", O_WRONLY|O_CREAT, 0666));
> unlink("whatever");
>
> (2) Try the "noac" nfs mount option, it'll cost performance though.
>
> (3) Another solution might be to use the patch at www.frankvm.com/nfs-noac
> to selectively disable attribute caching (see the README). It's a trick
> I use for some distributed work.
>
>
--
-------------------------------------------------------------------
Dipl. Inf. (FH) Stefan Palme
email: kleiner@hora-obscura.de
www: http://hbci4java.kapott.org
icq: 36376278
phon: +49 341 3910484
fax: +49 1212 517956219
mobil: +49 178 3227887
key fingerprint: 1BA7 D217 36A1 534C A5AD F18A E2D1 488A E904 F9EC
-------------------------------------------------------------------
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: disabling caching
2006-07-14 9:44 ` Stefan Palme
@ 2006-07-14 12:17 ` Stefan Palme
2006-07-14 12:19 ` Stefan Palme
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Palme @ 2006-07-14 12:17 UTC (permalink / raw)
To: Linux NFS mailing list
Hmpf. Using variant (2) did not fix the problem. Is it enough to
remount -o remount /my/imported/dir,
or do I have to completely unmount and remount the directory? I ask
before doing this, because doing this would require to completely
shutdown our server process first, because this process has open
files in the mounted dir...
I have taken a look at patch (3), but I guess, this would not make
much difference to solution (2), because this patch does the same
as the noac-option, but more "locally" (in time and place) - am I right?
Are there any other hints?
Best regards
-stefan-
> Thanks. Variant (1) is not possible for me, because I can't modify
> the application in question. Variant (2) may be exactly what I have
> searched for (but did not read "man nfs" down to the end :-)
>
> regards
> -stefan-
>
> > On Fri, Jul 14, 2006 at 10:12:32AM +0200, Stefan Palme wrote:
> > >
> > > After a few seconds, the open() call on the second box succeeds.
> > > So I guess that caching is the reason for the second open()-call
> > > to fail.
> >
> > You might want to try (1) and/or ((2) or (3)) on the NFS client:
> >
> > (1) On the NFS client, put this before the open():
> >
> > close(open("whatever", O_WRONLY|O_CREAT, 0666));
> > unlink("whatever");
> >
> > (2) Try the "noac" nfs mount option, it'll cost performance though.
> >
> > (3) Another solution might be to use the patch at www.frankvm.com/nfs-noac
> > to selectively disable attribute caching (see the README). It's a trick
> > I use for some distributed work.
> >
> >
--
-------------------------------------------------------------------
Dipl. Inf. (FH) Stefan Palme
email: kleiner@hora-obscura.de
www: http://hbci4java.kapott.org
icq: 36376278
phon: +49 341 3910484
fax: +49 1212 517956219
mobil: +49 178 3227887
key fingerprint: 1BA7 D217 36A1 534C A5AD F18A E2D1 488A E904 F9EC
-------------------------------------------------------------------
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-07-14 16:01 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-14 8:12 disabling caching Stefan Palme
2006-07-14 9:26 ` Frank van Maarseveen
2006-07-14 9:44 ` Stefan Palme
2006-07-14 12:17 ` Stefan Palme
2006-07-14 12:19 ` Stefan Palme
[not found] ` <76bd70e30607140615x606fb651r61d09d636147336b@mail.gmail.com>
2006-07-14 15:13 ` Stefan Palme
2006-07-14 15:27 ` Daniel Forrest
2006-07-14 15:34 ` Stefan Palme
2006-07-14 16:01 ` Daniel Forrest
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.