public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* NFSROOT with NFS Version 3
@ 2006-11-17 15:40 Christoph Pleger
  2006-11-17 16:20 ` Trond Myklebust
  0 siblings, 1 reply; 8+ messages in thread
From: Christoph Pleger @ 2006-11-17 15:40 UTC (permalink / raw)
  To: linux-kernel

Hello,

I tried to switch an NFSROOT-Environment from NFS version 2 to NFS
version 3, but unfortunately my test client machine now hangs every time
after booting as soon as some bigger file system activity should occur.
I tried Kernel 2.6.14.7 and Kernel 2.6.16.32.

The problem did not occur with NFS version 2.

Does anybody know the problem and/or a solution?

Regards
  Christoph Pleger

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NFSROOT with NFS Version 3
  2006-11-17 15:40 NFSROOT with NFS Version 3 Christoph Pleger
@ 2006-11-17 16:20 ` Trond Myklebust
  2006-11-20 11:07   ` Christoph Pleger
  0 siblings, 1 reply; 8+ messages in thread
From: Trond Myklebust @ 2006-11-17 16:20 UTC (permalink / raw)
  To: Christoph Pleger; +Cc: linux-kernel

On Fri, 2006-11-17 at 16:40 +0100, Christoph Pleger wrote:
> Hello,
> 
> I tried to switch an NFSROOT-Environment from NFS version 2 to NFS
> version 3, but unfortunately my test client machine now hangs every time
> after booting as soon as some bigger file system activity should occur.
> I tried Kernel 2.6.14.7 and Kernel 2.6.16.32.
> 
> The problem did not occur with NFS version 2.
> 
> Does anybody know the problem and/or a solution?

That is almost always due to the difference in r/wsize that the Linux
NFS server advertises for v2 and v3 combined with using UDP. If you have
poor networking, then don't use UDP, and certainly not with 32k r/wsize.

IOW: try either setting the mount options "rsize=8192,wsize=8192", or
the option "proto=tcp"

Cheers
  Trond


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NFSROOT with NFS Version 3
  2006-11-17 16:20 ` Trond Myklebust
@ 2006-11-20 11:07   ` Christoph Pleger
  2006-11-20 13:57     ` Joe Korty
  0 siblings, 1 reply; 8+ messages in thread
From: Christoph Pleger @ 2006-11-20 11:07 UTC (permalink / raw)
  To: linux-kernel

Hello,

On Fri, 17 Nov 2006 11:20:17 -0500
Trond Myklebust <trond.myklebust@fys.uio.no> wrote:

> On Fri, 2006-11-17 at 16:40 +0100, Christoph Pleger wrote:
> > Hello,
> > 
> > I tried to switch an NFSROOT-Environment from NFS version 2 to NFS
> > version 3, but unfortunately my test client machine now hangs every
> > time after booting as soon as some bigger file system activity
> > should occur. I tried Kernel 2.6.14.7 and Kernel 2.6.16.32.
> > 
> > The problem did not occur with NFS version 2.
> > 
> > Does anybody know the problem and/or a solution?
> 
> That is almost always due to the difference in r/wsize that the Linux
> NFS server advertises for v2 and v3 combined with using UDP. If you
> have poor networking, then don't use UDP, and certainly not with 32k
> r/wsize.
> 
> IOW: try either setting the mount options "rsize=8192,wsize=8192", or
> the option "proto=tcp"

No, that was not the problem. I tried it, bit it did not help.

Later, I noticed the following message that appeared during the boot
process:

Warning: Unable to open an initial console

So, on the NFS server, I made a copy of the NFSROOT-Directory, exported
the copy read-write (the original is exported read-only) and used the
copy as NFSROOT for the client. And now the client works well.

But now I have two questions:

1. Why did the problem not occur with NFS version 2? On the client,
/dev/console should have been read-only with version 2 as well.
2. What can I do to get a "real" solution? Exporting the original
NFSROOT read-write is not possible for me.

Regards
  Christoph Pleger

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NFSROOT with NFS Version 3
  2006-11-20 11:07   ` Christoph Pleger
@ 2006-11-20 13:57     ` Joe Korty
  2006-11-20 16:33       ` Christoph Pleger
  0 siblings, 1 reply; 8+ messages in thread
From: Joe Korty @ 2006-11-20 13:57 UTC (permalink / raw)
  To: Christoph Pleger; +Cc: linux-kernel

On Mon, Nov 20, 2006 at 12:07:50PM +0100, Christoph Pleger wrote:
> Warning: Unable to open an initial console

This usually means /dev/console doesn't exist.  With many of
today's distributions, this means you didn't boot with a
initrd properly set up to run with your newly built kernel.

If you don't want to create an initrd just to get yourself
a properly set up /dev, then you need to put on the root's
true /dev those few tmpfs /dev entries that might be used
during the boot process:

    mount --bind / /mnt
    cd /mnt/dev
    mknod null c 1 3
    mknod console c 5 1
    for i in $(seq 0 9); do mknod tty$i c 4 $i; done
    cd /
    umount /mnt

Joe

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NFSROOT with NFS Version 3
  2006-11-20 13:57     ` Joe Korty
@ 2006-11-20 16:33       ` Christoph Pleger
  2006-11-20 17:34         ` Trond Myklebust
                           ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Christoph Pleger @ 2006-11-20 16:33 UTC (permalink / raw)
  To: linux-kernel

Hello,

On Mon, 20 Nov 2006 08:57:16 -0500
Joe Korty <joe.korty@ccur.com> wrote:

> On Mon, Nov 20, 2006 at 12:07:50PM +0100, Christoph Pleger wrote:
> > Warning: Unable to open an initial console
> 
> This usually means /dev/console doesn't exist.  With many of
> today's distributions, this means you didn't boot with a
> initrd properly set up to run with your newly built kernel.

The device /dev/console exists, but init/main.c tries to open it
read-write. As the nfsroot is mounted read-only, /dev/console cannot be
opened read-write.

Regards
  Christoph Pleger

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NFSROOT with NFS Version 3
  2006-11-20 16:33       ` Christoph Pleger
@ 2006-11-20 17:34         ` Trond Myklebust
  2006-11-20 18:06         ` Peter Staubach
  2006-11-21  0:11         ` Bill Davidsen
  2 siblings, 0 replies; 8+ messages in thread
From: Trond Myklebust @ 2006-11-20 17:34 UTC (permalink / raw)
  To: Christoph Pleger; +Cc: linux-kernel

On Mon, 2006-11-20 at 17:33 +0100, Christoph Pleger wrote:
> Hello,
> 
> On Mon, 20 Nov 2006 08:57:16 -0500
> Joe Korty <joe.korty@ccur.com> wrote:
> 
> > On Mon, Nov 20, 2006 at 12:07:50PM +0100, Christoph Pleger wrote:
> > > Warning: Unable to open an initial console
> > 
> > This usually means /dev/console doesn't exist.  With many of
> > today's distributions, this means you didn't boot with a
> > initrd properly set up to run with your newly built kernel.
> 
> The device /dev/console exists, but init/main.c tries to open it
> read-write. As the nfsroot is mounted read-only, /dev/console cannot be
> opened read-write.

Yes. NFSv3 has an ACCESS rpc call, which allows the client to request
the correct permissions from the server rather than relying on mode
bits.
IOW: this is definitely an intentional feature.

Cheers,
  Trond


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NFSROOT with NFS Version 3
  2006-11-20 16:33       ` Christoph Pleger
  2006-11-20 17:34         ` Trond Myklebust
@ 2006-11-20 18:06         ` Peter Staubach
  2006-11-21  0:11         ` Bill Davidsen
  2 siblings, 0 replies; 8+ messages in thread
From: Peter Staubach @ 2006-11-20 18:06 UTC (permalink / raw)
  To: Christoph Pleger; +Cc: linux-kernel

Christoph Pleger wrote:
> Hello,
>
> On Mon, 20 Nov 2006 08:57:16 -0500
> Joe Korty <joe.korty@ccur.com> wrote:
>
>   
>> On Mon, Nov 20, 2006 at 12:07:50PM +0100, Christoph Pleger wrote:
>>     
>>> Warning: Unable to open an initial console
>>>       
>> This usually means /dev/console doesn't exist.  With many of
>> today's distributions, this means you didn't boot with a
>> initrd properly set up to run with your newly built kernel.
>>     
>
> The device /dev/console exists, but init/main.c tries to open it
> read-write. As the nfsroot is mounted read-only, /dev/console cannot be
> opened read-write.

If so, that is a bug.  Whether or not the file system containing the
device node is mounted read-only should not affect how a device can
be opened.

       ps

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: NFSROOT with NFS Version 3
  2006-11-20 16:33       ` Christoph Pleger
  2006-11-20 17:34         ` Trond Myklebust
  2006-11-20 18:06         ` Peter Staubach
@ 2006-11-21  0:11         ` Bill Davidsen
  2 siblings, 0 replies; 8+ messages in thread
From: Bill Davidsen @ 2006-11-21  0:11 UTC (permalink / raw)
  To: Christoph Pleger, Linux Kernel mailing List

Christoph Pleger wrote:
> Hello,
> 
> On Mon, 20 Nov 2006 08:57:16 -0500
> Joe Korty <joe.korty@ccur.com> wrote:
> 
>> On Mon, Nov 20, 2006 at 12:07:50PM +0100, Christoph Pleger wrote:
>>> Warning: Unable to open an initial console
>> This usually means /dev/console doesn't exist.  With many of
>> today's distributions, this means you didn't boot with a
>> initrd properly set up to run with your newly built kernel.
> 
> The device /dev/console exists, but init/main.c tries to open it
> read-write. As the nfsroot is mounted read-only, /dev/console cannot be
> opened read-write.

That doesn't sound right, but hum... try mounting noatime, perhaps some 
additional checking is being done.

Note: I'm pulling that out of the air, I haven't had a problem with it. 
Dare I assume that you checked the major,minor and all that good stuff?

-- 
bill davidsen <davidsen@tmr.com>
   CTO TMR Associates, Inc
   Doing interesting things with small computers since 1979

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-11-21  0:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-17 15:40 NFSROOT with NFS Version 3 Christoph Pleger
2006-11-17 16:20 ` Trond Myklebust
2006-11-20 11:07   ` Christoph Pleger
2006-11-20 13:57     ` Joe Korty
2006-11-20 16:33       ` Christoph Pleger
2006-11-20 17:34         ` Trond Myklebust
2006-11-20 18:06         ` Peter Staubach
2006-11-21  0:11         ` Bill Davidsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox