Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 355329

Summary: sys-apps/util-linux-2.19: remount nfs root fs read/write does not work
Product: Gentoo Linux Reporter: holger.gleissner
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: CONFIRMED ---    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
URL: https://bugzilla.kernel.org/show_bug.cgi?id=29652
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
/proc/mounts
strace -f -s 4096 -v -o /ram/log_without_rw mount
strace -f -s 4096 -v -o log_with_rw mount

Description holger.gleissner 2011-02-17 14:03:20 UTC
After upgrade from version 2.18-r1 to sys-apps/util-linux-2.19 the remount of the nfs root-fs in the boot process of the nfs booted client failed with following errors:
"mount.nfs remote share not in host:dir format"
"Root filesystem could not be mounted read/write"
After replace /bin/mount with the old version/downgrade to version util-linux-2.18.r1 all works properly again.

Reproducible: Always

Steps to Reproduce:
1. emerge sys-apps/util-linux-2.19
2. reboot nfs-rooted client
3.

Actual Results:  
root device is not mounted writable and so errors occur sequence

Expected Results:  
root device should be mounted writable
Comment 1 holger.gleissner 2011-02-17 14:10:47 UTC
Created attachment 262837 [details]
emerge --info
Comment 2 SpanKY gentoo-dev 2011-02-18 05:29:49 UTC
please post the relevant mount line from /proc/mounts and /etc/mtab and /etc/fstab

further, what version of nfs-utils do you have installed ?  that provides `mount.nfs` now ... although i'm not sure of its usage off the top of my head in the remount scenario ...
Comment 3 holger.gleissner 2011-02-18 09:21:11 UTC
(In reply to comment #2)
> please post the relevant mount line from /proc/mounts and /etc/mtab and
> /etc/fstab
> 
> further, what version of nfs-utils do you have installed ?  that provides
> `mount.nfs` now ... although i'm not sure of its usage off the top of my head
> in the remount scenario ...
> 

I have tested first with /sbin/mount.nfs and replace it with the version of 1.2.2-r2 but no success and no change of the error messages (the current version of nfs-utils is 1.2.3-r1).

nz23050 hg # ls -ls /etc/mtab 
0 lrwxrwxrwx 1 root root 12  9. Apr 2008  /etc/mtab -> /proc/mounts

nz23050 hg # cat /etc/fstab
# fake root entry to make e.g. checkroot happy (and to have / appear in mount)
#netroot		/		none	bind		0 0
proc        	/proc		proc    defaults	0 0
shm         	/dev/shm     	tmpfs   nodev,nosuid,noexec  0 0
/ram/media	/media		none	bind		0 0
:::

Please note the first line (netroot ...) is commented! If I activate the first line, the boot process looks like this:
* Remounting root filesystem read/write ...
mount: warning: / seems to be mounted read-only.      ok

The pxe boot statement is the following:
nz00101 ~ # cat /export/tftpboot/onesis/boot/pxelinux.cfg/master-vm
:::
  kernel vmlinuz-2.6.35-gentoo-r15-vm
  append ip=dhcp root=/dev/nfs nfsroot=10.231.0.101:/export/tftpboot/onesis-   master-vm acpi=off noapic
:::

Is there a way to mount the nfs-root read-only bypass, because it's not really necessary, and to immediately mount read-write?

Comment 4 SpanKY gentoo-dev 2011-02-22 03:34:51 UTC
you didnt post the /proc/mounts line ... new util-linux probably doesnt like when you symlink /etc/mtab to /proc/mounts

you can put "rw" or "ro" on the kernel command line to control the boot time mount state

if you put "ro" into the fstab, baselayout will ignore it while remounting
Comment 5 SpanKY gentoo-dev 2011-02-22 03:55:32 UTC
seems to me that the issue is with your /etc/mtab -> /proc/mounts.  default mount wont include "proto=tcp" and so the mtab wont have it and so the remount wont include it.  but the /proc/mounts will always list it, and nfs mount doesnt like having that in its mount lines.

proto=tcp causes the mount() syscall to return EINVAL
Comment 6 holger.gleissner 2011-02-22 09:08:10 UTC
Created attachment 263417 [details]
/proc/mounts
Comment 7 holger.gleissner 2011-02-23 12:23:30 UTC
(In reply to comment #5)
> seems to me that the issue is with your /etc/mtab -> /proc/mounts.  default
> mount wont include "proto=tcp" and so the mtab wont have it and so the remount
> wont include it.  but the /proc/mounts will always list it, and nfs mount
> doesnt like having that in its mount lines.
> 
> proto=tcp causes the mount() syscall to return EINVAL
> 

Thanks for your input!

I have tested now first with a non-symlink /etc/mtab, reboot 2 times, upgrade util-linux, but no success, the error messages are the same as before.
Second I have tested with "rw" in the kernel command line and the master client booted properly with read-write access, also with a symlink for /etc/mtab again.


Comment 8 SpanKY gentoo-dev 2011-02-23 17:47:01 UTC
there might be something specific to doing it via nfsroot=, but it'd take me some time to find out what

you should run `strace -f -s 4096 -v -o log` on both the old mount and the new mount, and post both logs as attachments
Comment 9 holger.gleissner 2011-02-24 08:28:41 UTC
(In reply to comment #8)
> there might be something specific to doing it via nfsroot=, but it'd take me
> some time to find out what
> 
> you should run `strace -f -s 4096 -v -o log` on both the old mount and the new
> mount, and post both logs as attachments
> 

I am not sure that I have understand you correctly. I have done the following:
boot without "rw" and with "rw"in the kernel command line and run the command strace -f -s 4096 -v -o /ram/log_without_rw mount / strace -f -s 4096 -v -o log_with_rw mount.

I hope that was what you wanted.



Comment 10 holger.gleissner 2011-02-24 08:29:30 UTC
Created attachment 263663 [details]
strace -f -s 4096 -v -o /ram/log_without_rw mount
Comment 11 holger.gleissner 2011-02-24 08:30:11 UTC
Created attachment 263665 [details]
strace -f -s 4096 -v -o log_with_rw mount
Comment 12 SpanKY gentoo-dev 2011-08-29 21:25:29 UTC
could you give 2.20 a spin ?  it has had a bunch of fixes to mount added to it since the 2.19 release ...
Comment 13 holger.gleissner 2011-09-19 13:27:06 UTC
(In reply to comment #12)
> could you give 2.20 a spin ?  it has had a bunch of fixes to mount added to it
> since the 2.19 release ...

here is the boot-test without "rw" in the kernel command line and version 2.20 (udev-171-r1):
:::
* Starting udevd                                        ok
:::
* Waiting for uevents to be processed ...               ok
* devfs: waiting for udev (50 seconds)
* devfs: waiting for udev (41 seconds)
:::
* devfs: waiting for udev (5 seconds)
* devfs: timed out waiting for udev
:::
* Remounting root filesystem read/write
mount.nfs: remote share not in 'host:dir' format
* Root filesystem could not be mounted read/write
:::