Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Mar 1996 11:41:35 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        koshy@india.hp.com (A JOSEPH KOSHY)
Cc:        hackers@FreeBSD.ORG
Subject:   Re: NFS problems w/ HPUX 9.0.5
Message-ID:  <199603161841.LAA17568@phaeton.artisoft.com>
In-Reply-To: <199603160951.AA119769876@fakir.india.hp.com> from "A JOSEPH KOSHY" at Mar 16, 96 03:21:15 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> This one has me stumped at the moment.
> 
> I'm mounting a disk from an HPUX 9.0.5 machine via NFS.  I find that if
> I'm reading/writing simultaneously from the remote disk data gets corrupted.

OK... but your "test" doesn't provide evidence for this.

> The same sequence of operations across two FreeBSD boxes works fine.
> 
> Here is how to replicate the problem: consider two machines, `REMOTE'
> and a FreeBSD box `LOCAL'.
> 
>     on REMOTE : export /fs1 -maproot=root etc
> 
>     from LOCAL : 
> 	copy /usr/src/sys to REMOTE:/fs1/sys # copy tree first
> 
>     on LOCAL: 
> 	
> 	cd REMOTE:/fs1; # reads only 
> 		find ./sys -type f -print | xargs md5 > /tmp/md5-r
> 
> 	This gets you the first set of checksums.  
> 
> 	Then on LOCAL do the following two commands simultaneously on the
> 	remote mounted partition.
> 
> 	cd REMOTE:/fs1/sys;  mkdir ../sys2;
> 		find . -print | cpio -pdum ../sys2 & # copy tree and ...
> 	cd REMOTE:/fs1;  
> 		find ./sys -type f -print | xargs md5 > /tmp/md5-rw  # read it
> 
> 
> 	Ie. we run the checksumming on the original tree while the copy 
> 	over NFS is in progress.
> 
>     Diff /tmp/md5-r /tmp/md5-rw | more
> 
> 		--> lots of differences if `REMOTE' was not a FreeBSD box
> 		--> no problems if `REMOTE' is a FreeBSD box
> 
> Incidentally the same procedure repeated across two HPUX boxes works fine.

Apparently, the difference is whether the reallocated pages are
zero-filled, or whether they contain their previous contents when you
rewrite them.  I don't see that this is a problem... if the data is
to be overwritten anyway, then its value is irrelevant.

This seems to be a client-cache/server cache interaction.  If it causes
you a problem, you will need to turn off either the client cache (if you
leave the server cache on) or vice versa.

This isn't the same problem as the corruption problem from the other
day, which I think would repeat BSD-to-BSD or HP-to-HP if tested (the
problem there is that it's hard to come up with a test for that case).

If you are going to have multiple clients operating on the same file,
you must use a loging protocol of some kind.

> So it looks like there is some kind of NFS incompatibility between FreeBSD
> and HPUX.  I don't have access to any Suns that I could test against.
> I'd be interested to know if any others on the list have encountered this
> problem.  Is there anything I can do to work around this problem?
> 
> I'm running FreeBSD 2.1.0-RELEASE on a P5/16MB/500MB-IDE HP Vectra.

Can you toggle whether or not you do client caching on the client, or
server caching on the server?

What version of the NFS protocol are you using?

If you are using NFS v3, do you have leases on or off?  They are set
seperately from other NFS kernel options (see /sys/i386/conf/LINT for
more information).


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603161841.LAA17568>