Subject: kern/11516: nfs exporting of lfs doesn't work very well
To: None <gnats-bugs@gnats.netbsd.org>
From: Antti Kantee <pooka@iki.fi>
List: netbsd-bugs
Date: 11/18/2000 09:13:14
>Number:         11516
>Category:       kern
>Synopsis:       nfs exporting of lfs doesn't work very well
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 18 09:13:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Antti Kantee
>Release:        1.5_BETA
>Organization:
>Environment:
Both client and server are i386 running 1.5_BETA


>Description:

The problem surfaces itself eg. when doing cvs co on the client. The client
used to panic, but panicing was fixed by Frank van der Linden. One
thing remains: directories. You must recognize directories. Then, only then
will exporting lfs work:

babylon5:22:/sources> cvs co pkgsrc
cvs server: Updating pkgsrc
U pkgsrc/Makefile
cvs [checkout aborted]: writing pkgsrc/Packages.txt: Input/output error
Write failed flushing stdout buffer.
write stdout: Broken pipe

and then:
babylon5:57:/sources/pkgsrc> ls -ld .new.Packages.
drwxr-xr-x  1 pooka  wheel  0 Nov 17 10:32 .new.Packages.
babylon5:58:/sources/pkgsrc> file !$
file .new.Packages.
.new.Packages.: directory
babylon5:59:/sources/pkgsrc> rmdir !$
rmdir .new.Packages.
rmdir: .new.Packages.: Not a directory

but on the server:
dungeonmaster:7:/m/dm/sources/pkgsrc> ls -l .new.Packages. 
-rwxr-xr-x  1 pooka  wheel  0 Nov 17 10:32 .new.Packages.
dungeonmaster:8:/m/dm/sources/pkgsrc> file !$
file .new.Packages.
.new.Packages.: empty

Here's a tcpdump of what's happening (not from the above checkout, but
something done earlier):
19:25:20.696610 babylon5.1882764425 > dungeonmaster.nfs: 132 access fh 0,28/201326592 001c (ttl 64, id 3849)
19:25:20.696624 babylon5.1882764426 > dungeonmaster.nfs: 132 access fh 0,28/201326592 001c (ttl 64, id 3850)
19:25:20.696634 babylon5.1882764427 > dungeonmaster.nfs: 128 getattr fh 0,28/201326592 (ttl 64, id 3851)
19:25:20.696647 babylon5.1882764428 > dungeonmaster.nfs: 132 access fh 0,28/201326592 001c (ttl 64, id 3852)
19:25:20.696659 babylon5.1882764429 > dungeonmaster.nfs: 136 proc-22 (ttl 64, id 3853)
19:25:20.696671 babylon5.1882764430 > dungeonmaster.nfs: 108 proc-22 (ttl 64, id 3854)
19:25:20.696681 babylon5.1882764431 > dungeonmaster.nfs: 116 access fh 0,28/201326592 001c (ttl 64, id 3861)
19:25:20.697376 dungeonmaster.nfs > babylon5.1882764431: reply ok 124 access attr: c 0001 (ttl 64, id 64875)
19:25:20.697750 babylon5.1882764432 > dungeonmaster.nfs: 116 access fh 0,28/201326592 001c (ttl 64, id 3862)
19:25:20.698345 dungeonmaster.nfs > babylon5.1882764432: reply ok 124 access attr: c 0001 (ttl 64, id 64876)
19:25:20.698639 babylon5.1882764433 > dungeonmaster.nfs: 112 getattr fh 0,28/201326592 (ttl 64, id 3863)
19:25:20.699237 dungeonmaster.nfs > babylon5.1882764433: reply ok 116 getattr NON 1 ids 1/1323 sz 429496729600  (ttl 64, id 64877)
19:25:20.699531 babylon5.1882764434 > dungeonmaster.nfs: 116 access fh 0,28/201326592 001c (ttl 64, id 3864)
19:25:20.700132 dungeonmaster.nfs > babylon5.1882764434: reply ok 124 access attr: c 0001 (ttl 64, id 64878)
19:25:20.700656 babylon5.1882764435 > dungeonmaster.nfs: 120 proc-22 (ttl 64, id 3865)
19:25:20.701279 dungeonmaster.nfs > babylon5.1882764435: reply ok 132 proc-22 (ttl 64, id 64879)
19:25:20.702127 babylon5.1882764436 > dungeonmaster.nfs: 112 access fh 0,16/1835 0002 (ttl 64, id 3866)
19:25:20.702725 dungeonmaster.nfs > babylon5.1882764436: reply ok 120 access attr: DIR 775 ids 0/0 sz 512 nlink 5 rdev 3238/1088 fsid ca600000440 nodeid 44000000000 a/m/ctime 972491175.800000000 972491175.170000000 972491175.170000000  c 0002 (ttl 64, id 64880)
19:25:20.703091 babylon5.1882764437 > dungeonmaster.nfs: 116 lookup fh 0,16/1835 "CVS" (ttl 64, id 3867)
19:25:20.703802 dungeonmaster.nfs > babylon5.1882764437: reply ok 116 lookup ERROR: No such file or directory (ttl 64, id 64881)
19:25:20.730239 babylon5.1882764438 > dungeonmaster.nfs: 112 getattr fh 0,28/201326592 (ttl 64, id 3868)
19:25:20.730820 dungeonmaster.nfs > babylon5.1882764438: reply ok 116 getattr NON 2 ids 2/1323 sz 429496729600  (ttl 64, id 64882)
19:25:20.731170 babylon5.1882764439 > dungeonmaster.nfs: 116 access fh 0,28/201326592 001c (ttl 64, id 3869)
19:25:20.731763 dungeonmaster.nfs > babylon5.1882764439: reply ok 124 access attr: c 0001 (ttl 64, id 64883)
19:25:21.134802 babylon5.1882764440 > dungeonmaster.nfs: 112 getattr fh 0,28/201326592 (ttl 64, id 3875)
19:25:21.135421 dungeonmaster.nfs > babylon5.1882764440: reply ok 116 getattr NON 1 ids 1/1323 sz 429496729600  (ttl 64, id 64884)
19:25:21.135757 babylon5.1882764441 > dungeonmaster.nfs: 116 access fh 0,28/201326592 001c (ttl 64, id 3876)
19:25:21.136357 dungeonmaster.nfs > babylon5.1882764441: reply ok 124 access attr: c 0001 (ttl 64, id 64885)
19:25:21.136650 babylon5.1882764442 > dungeonmaster.nfs: 120 proc-22 (ttl 64, id 3877)
19:25:21.137277 dungeonmaster.nfs > babylon5.1882764442: reply ok 132 proc-22 (ttl 64, id 64886)
19:25:21.989609 babylon5.1882764443 > dungeonmaster.nfs: 120 lookup fh 0,16/1835 "pkgsrc" (ttl 64, id 3888)
19:25:21.990323 dungeonmaster.nfs > babylon5.1882764443: reply ok 116 lookup ERROR: No such file or directory (ttl 64, id 64887)
19:25:22.073392 babylon5.1882764444 > dungeonmaster.nfs: 120 lookup fh 0,16/1835 "pkgsrc" (ttl 64, id 3890)
19:25:22.074024 dungeonmaster.nfs > babylon5.1882764444: reply ok 116 lookup ERROR: No such file or directory (ttl 64, id 64888)
19:25:22.074404 babylon5.1882764445 > dungeonmaster.nfs: 148 mkdir fh 0,16/1835 "pkgsrc" (ttl 64, id 3891)
19:25:22.075627 dungeonmaster.nfs > babylon5.1882764445: reply ok 268 mkdir fh 0,16/1835 DIR 755 ids 1323/0 sz 512 nlink 2 rdev 4095/1048574 fsid fff000ffffe nodeid ffffe00000000 a/m/ctime 972491198.170000000 972491198.180000000 972491198.180000000 dir attr: PRE: [|nfs] (ttl 64, id 64889)
19:25:22.076115 babylon5.1882764446 > dungeonmaster.nfs: 120 lookup fh 0,16/1835 "pkgsrc" (ttl 64, id 3892)
19:25:22.076952 dungeonmaster.nfs > babylon5.1882764446: reply ok 236 lookup fh 0,16/1835 DIR 755 ids 1323/0 sz 512 nlink 2 rdev 4095/1048574 fsid fff000ffffe nodeid ffffe00000000 a/m/ctime 972491198.170000000 972491198.180000000 972491198.180000000  post dattr: DIR 775 ids 0/0 sz 512 nlink 6 rdev 3238/1088 fsid ca600000440 nodeid 44000000000 a/m/ctime 972491175.800000000 972491198.170000000 972491198.170000000  (ttl 64, id 64890)

The disklabel on the server look like this:
#        size   offset     fstype   [fsize bsize   cpg]
  a:  6185088        0     4.4LFS     1024  8192     0   # (Cyl.    0 - 6135)

The only extra parameters give to mount are -b and -i.

>How-To-Repeat:

export lfs via nfs

>Fix:

?
>Release-Note:
>Audit-Trail:
>Unformatted: