2006-02-01 06:07:45

by Knut Petersen

[permalink] [raw]
Subject: [BUG] nfs version 2 broken

Hi everybody,

The good news is that I finally succeeded to boot over network
using the PXE-bootrom / ip dhcp autoconfig / nfsroot method.
But "ip=dhcp root=/dev/nfs nfsroot=%s" is not the way to go
with recent kernels. This results in a kernel panic caused by
the inability to find root. Things go wrong immediately after
rpc port lookup:

> NFS: Buggy server - nlink == 0!
> nfs_fhget failed

Well, adding ",v3" to the nfsroot parameter helps, forcing the
client not to use the default nfs version 2 but nfs version 3.

All machines use kernel 2.6.15-git7.

cu,
Knut


2006-02-01 06:15:19

by Trond Myklebust

[permalink] [raw]
Subject: Re: [BUG] nfs version 2 broken

On Wed, 2006-02-01 at 07:07 +0100, Knut Petersen wrote:
> Hi everybody,
>
> The good news is that I finally succeeded to boot over network
> using the PXE-bootrom / ip dhcp autoconfig / nfsroot method.
> But "ip=dhcp root=/dev/nfs nfsroot=%s" is not the way to go
> with recent kernels. This results in a kernel panic caused by
> the inability to find root. Things go wrong immediately after
> rpc port lookup:
>
> > NFS: Buggy server - nlink == 0!
> > nfs_fhget failed

What kind of server is this that you are using? The above message
basically means that it is handing out inodes with a link count of 0.

Cheers,
Trond

2006-02-01 06:34:39

by Knut Petersen

[permalink] [raw]
Subject: Re: [BUG] nfs version 2 broken

Trond Myklebust schrieb:

>What kind of server is this that you are using? The above message
>basically means that it is handing out inodes with a link count of 0.
>
>Cheers,
> Trond
>
>

Server:
=====

AOpen i915GMm-HFS with Pentium M, linux kernel 2.6.15-git7
running a system that startet as SuSE 9.2. Nfs-utils are still
the original 1.0.6, grep -i nfs linuxbuild/.config gives

CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_DIRECTIO is not set
CONFIG_NFSD=y
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
# CONFIG_NFSD_V4 is not set
CONFIG_NFSD_TCP=y
CONFIG_NFS_COMMON=y

Client
====

kernel build from the same source,

CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_DIRECTIO is not set
CONFIG_NFSD=y
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
# CONFIG_NFSD_V4 is not set
CONFIG_NFSD_TCP=y
CONFIG_ROOT_NFS=y
CONFIG_NFS_COMMON=y

cu,
Knut

2006-02-01 06:35:44

by Trond Myklebust

[permalink] [raw]
Subject: Re: [BUG] nfs version 2 broken

On Wed, 2006-02-01 at 07:34 +0100, Knut Petersen wrote:
> Trond Myklebust schrieb:
>
> >What kind of server is this that you are using? The above message
> >basically means that it is handing out inodes with a link count of 0.
> >
> >Cheers,
> > Trond
> >
> >
>
> Server:
> =====
>
> AOpen i915GMm-HFS with Pentium M, linux kernel 2.6.15-git7
> running a system that startet as SuSE 9.2. Nfs-utils are still
> the original 1.0.6, grep -i nfs linuxbuild/.config gives

...and what kind of filesystem are you exporting?

Cheers,
Trond

2006-02-01 06:46:12

by Knut Petersen

[permalink] [raw]
Subject: Re: [BUG] nfs version 2 broken


>>AOpen i915GMm-HFS with Pentium M, linux kernel 2.6.15-git7
>>running a system that startet as SuSE 9.2. Nfs-utils are still
>>the original 1.0.6, grep -i nfs linuxbuild/.config gives
>>
>>
>
>...and what kind of filesystem are you exporting?
>
>
>

linux:/src/k6bv3p # dmesg | grep sda

[4294667.296000] Kernel command line: root=/dev/sda3
video=intelfb:vram=8 vga=0x307
[ 46.848978] SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
[ 46.850423] sda: Write Protect is off
[ 46.851871] sda: Mode Sense: 00 3a 00 10
[ 46.851884] SCSI device sda: drive cache: write back w/ FUA
[ 46.853385] SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
[ 46.854868] sda: Write Protect is off
[ 46.856330] sda: Mode Sense: 00 3a 00 10
[ 46.856342] SCSI device sda: drive cache: write back w/ FUA
[ 46.857821] sda: sda1 sda2 sda3
[ 46.869751] sd 0:0:0:0: Attached scsi disk sda
[ 20.839566] ReiserFS: sda3: found reiserfs format "3.6" with standard
journal
[ 22.412053] ReiserFS: sda3: using ordered data mode
[ 22.417920] ReiserFS: sda3: journal params: device sda3, size 8192,
journal first block 18, max trans len 1024, max batch900, max commit age
30, max trans age 30
[ 22.419518] ReiserFS: sda3: checking transaction log (sda3)
[ 22.440517] ReiserFS: sda3: Using r5 hash to sort names
[ 24.597554] Adding 1052216k swap on /dev/sda1. Priority:42 extents:1
across:1052216k

(printk timestamp anomalities caused by cpu speed)

cu,
Knut


cu,
Knut


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2006-02-01 07:14:41

by Knut Petersen

[permalink] [raw]
Subject: Re: [BUG] nfs version 2 broken


>>AOpen i915GMm-HFS with Pentium M, linux kernel 2.6.15-git7
>>running a system that startet as SuSE 9.2. Nfs-utils are still
>>the original 1.0.6, grep -i nfs linuxbuild/.config gives
>>
>>
>
>...and what kind of filesystem are you exporting?
>
>
>

I think it is _not_ related to reiserfs. Moving my
exported /tftpboot directory to a fresh ext2 partition
gave the same results - failing with nfs 2, succeeding with
nfs 3.

cu,
Knut



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2006-02-01 16:41:05

by Trond Myklebust

[permalink] [raw]
Subject: Re: [BUG] nfs version 2 broken

On Wed, 2006-02-01 at 08:13 +0100, Knut Petersen wrote:
> >>AOpen i915GMm-HFS with Pentium M, linux kernel 2.6.15-git7
> >>running a system that startet as SuSE 9.2. Nfs-utils are still
> >>the original 1.0.6, grep -i nfs linuxbuild/.config gives
> >>
> >>
> >
> >...and what kind of filesystem are you exporting?
> >
> >
> >
>
> I think it is _not_ related to reiserfs. Moving my
> exported /tftpboot directory to a fresh ext2 partition
> gave the same results - failing with nfs 2, succeeding with
> nfs 3.

Does it do the same if you mount the same partition normally (i.e. not
through nfsroot) in some other directory?

Cheers,
Trond

2006-02-01 19:19:22

by Knut Petersen

[permalink] [raw]
Subject: Re: [BUG] nfs version 2 broken

Trond Myklebust wrote:

>Does it do the same if you mount the same partition normally (i.e. not
>through nfsroot) in some other directory?
>
>
>

That also fails. Same error message.

Unlike the nfsroot code at least my version of mount
does not use nfs version 2 as the default. I had to force
a v2 nfs mount attempt with mount -o nfsvers=2 ...

Would it be a good idea to change the default nfs version
nfsroot uses? I think nfsroot and mount defaults should
be identical.

BTW: Google shows some related old threads, e.g. "Madhan" writes on
2 Aug. 2001 06:55 "There has been a change in the NFS Client
behaviour in Linux Kernel 2.4.3 onwards. There are 2 issues here,
1. as traces show new clients expect link count '1' and NetWare
NFS has been sending '0' for volumes. ..."

cu,
Knut