Subject: Re: NFS root problems [Was: Re: Kernel cross build problems]
To: Ian Fry <Ian.Fry@sophos.com>
From: Ben Harris <bjh21@netbsd.org>
List: port-arm26
Date: 11/12/2001 21:03:23
On Mon, 12 Nov 2001, Ian Fry wrote:

> On Thu, Nov 08, 2001 at 09:48:40AM +0000, I wrote:
> > So, I thought I'd dump part of the disk to a file to examine on another
> > machine. I did 'dd if=/dev/rwd0c of=/disk bs=512 count=1024', dd reported
> > that it had written 512k, but the file was only 470k (ish).
>
> Over the weekend, I did a bit more playing around, and instead of dd-ing from
> the disk, I used /dev/zero. The same thing happened - I ended up with a file
> that was 24k too small when trying to create a 512k file. I'll do some more
> tests tonight with different sized files to see if there's any pattern to how
> much the files get truncated by.
>
> Is there anything I can do to try to help track this down?

I can't think of any particular things: just play around.  32k minus 24k
is 8k, which is the default NFS write size.  That looks as if under some
circumstances, only the first write of the last page to be written is
getting out.

Incidentally, I've noticed that it doesn't happen with cp(1), but it does
happen when redirecting a command to a file.

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/arm26               <URL:http://www.netbsd.org/Ports/arm26/>