Skip to contentSkip to conversation

nfsroot mount options

DISCUSSION Jim Rees 2 participants 5 messages Dec 2, 2010

Subsystems (2)
lore
Share & tools
lore

Jim Rees

author
#0 lore raw

If I boot diskless with nfsroot, why is the root file system mounted readonly? This makes sense for a file system on disk, since it may have to be checked before remounting rw, but I don't see why this is needed for nfsroot.

Also, Documentation/filesystems/nfs/nfsroot.txt says that only nfs options can be given on the kernel nfsroot option, but I've seen a claim that you can also put "rw" here. Are other generic options possible? How about the nfs options that aren't listed in the doc? Should the doc be updated?

#1 lore raw
Quoted 9 lines · Jim Rees

If I boot diskless with nfsroot, why is the root file system mounted readonly? This makes sense for a file system on disk, since it may have to be checked before remounting rw, but I don't see why this is needed for nfsroot.

Also, Documentation/filesystems/nfs/nfsroot.txt says that only nfs options can be given on the kernel nfsroot option, but I've seen a claim that you can also put "rw" here. Are other generic options possible? How about the nfs options that aren't listed in the doc? Should the doc be updated?

What kernel version are you looking at? I think 2.6.37-rc has some nfsroot updates that allow all NFS options to be used.

Not sure about the generic mount options. Why not just try them and see?

Signature · 2 lines
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
author
#2 lore raw

Chuck Lever wrote:

Quoted 9 lines · Jim Rees

If I boot diskless with nfsroot, why is the root file system mounted readonly? This makes sense for a file system on disk, since it may have to be checked before remounting rw, but I don't see why this is needed for nfsroot.

Also, Documentation/filesystems/nfs/nfsroot.txt says that only nfs options can be given on the kernel nfsroot option, but I've seen a claim that you can also put "rw" here. Are other generic options possible? How about the nfs options that aren't listed in the doc? Should the doc be updated?

What kernel version are you looking at? I think 2.6.37-rc has some nfsroot updates that allow all NFS options to be used.

Not sure about the generic mount options. Why not just try them and see?

This is Ubuntu lucid, so 2.6.32. I'm less concerned about the documentation defect than the question about the default being readonly. Is there any good reason other than to match the behavior of non-nfs root?

I ask because there has been a bug in ubuntu for a long time (a couple of releases) that prevents nfsroot from working. Their mountall is broken and can't remount an nfs root rw. They need to fix this obviously, but it got me to wondering why the remount should be needed at all.

The bug report is here:
https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/537133

#3 lore raw
Quoted 23 lines · Jim Rees

Chuck Lever wrote:

Quoted 9 lines · Jim Rees

If I boot diskless with nfsroot, why is the root file system mounted readonly? This makes sense for a file system on disk, since it may have to be checked before remounting rw, but I don't see why this is needed for nfsroot.

Also, Documentation/filesystems/nfs/nfsroot.txt says that only nfs options can be given on the kernel nfsroot option, but I've seen a claim that you can also put "rw" here. Are other generic options possible? How about the nfs options that aren't listed in the doc? Should the doc be updated?

What kernel version are you looking at? I think 2.6.37-rc has some nfsroot updates that allow all NFS options to be used.

Not sure about the generic mount options. Why not just try them and see?

This is Ubuntu lucid, so 2.6.32. I'm less concerned about the documentation defect than the question about the default being readonly. Is there any good reason other than to match the behavior of non-nfs root?

Quoted 7 lines

I ask because there has been a bug in ubuntu for a long time (a couple of releases) that prevents nfsroot from working. Their mountall is broken and can't remount an nfs root rw. They need to fix this obviously, but it got me to wondering why the remount should be needed at all.

The bug report is here:
https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/537133

OK, Ubuntu doesn't use NFSROOT (the kernel's implementation), it actually does a real mount in user space. So all the normal NFS and generic mount options ought to work.

However, I worked on the kernel's implementation recently, not Ubuntu's "nfsroot", so that's as far as my expertise goes.

Signature · 2 lines
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
author
#4 lore raw

Chuck Lever wrote:

OK, Ubuntu doesn't use NFSROOT (the kernel's implementation), it actually does a real mount in user space. So all the normal NFS and generic mount options ought to work.

I didn't realize that. I wonder why, especially since it doesn't work. So they pack a copy of nfs-utils in their initrd? And I could maybe use v4 as the root?

But if that's the case then I'm getting off topic for this list. Thanks for your help.