mountall issues with NFS root filesystem
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mountall (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Lucid |
Won't Fix
|
Medium
|
Unassigned | ||
Maverick |
Won't Fix
|
Medium
|
Unassigned | ||
Precise |
Fix Released
|
Undecided
|
Unassigned | ||
Quantal |
Fix Released
|
Undecided
|
Unassigned | ||
Raring |
Fix Released
|
Medium
|
Unassigned | ||
nfs-utils (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Won't Fix
|
Undecided
|
Unassigned | ||
Maverick |
Won't Fix
|
Undecided
|
Unassigned | ||
Precise |
Won't Fix
|
Undecided
|
Unassigned | ||
Quantal |
Won't Fix
|
Undecided
|
Unassigned | ||
Raring |
Won't Fix
|
Undecided
|
Unassigned | ||
portmap (Ubuntu) |
Fix Released
|
Medium
|
Steve Langasek | ||
Lucid |
Fix Released
|
Medium
|
Steve Langasek | ||
Maverick |
Fix Released
|
Medium
|
Unassigned | ||
Precise |
Fix Released
|
Undecided
|
Unassigned | ||
Quantal |
Fix Released
|
Undecided
|
Unassigned | ||
Raring |
Fix Released
|
Medium
|
Steve Langasek |
Bug Description
Binary package hint: mountall
I think I've found two bugs in mountall-2.7 related to nfsroots. This report describes both, since working around one exposes the other.
The first bug is a dependency issue, circular and otherwise. Unless the nfsroot is mounted with "nolock", NFS locking depends on rpc.statd, which depends on portmap, which depends on the "local-filesystems" event (in /etc/init/
The problem is that portmap.conf needs access to /etc (ro), /var/run (rw) and /lib/init/rw (rw). A dependency on "local-filesystems" essentially means / and /tmp. Changing the dependency to "virtual-
It gets messier in statd.conf, which doesn't call out any filesystem dependencies, yet requires portmap to be running. It tries to directly "start portmap" which fails because the mentioned filesystems aren't writable yet. Portmap and statd will start successfully later, but not in time to satisfy the rootfs dependency.
The second bug is when one tries to work around the above problems by specifying "nolock" in /etc/fstab for the nfsroot. In this case we land in mountall.c at the bottom of run_mount() where the is_remote() test causes spawn() to be called with wait=FALSE. spawn() then calls nih_child_
spawn: mount -n -a -t nfs -o remount,nolock 16.1.1.
spawn: mount / [272]
spawn: calling nih_child_add_watch for /
init: job_process_
The third line is debugging I added. If spawn_child_
mount / [272] exited normally
I didn't dig into libnih to figure out why this isn't working. Rather I changed the test on which wait=FALSE depends, since it seems like mountall should be waiting for the rootfs. This works, see attached patch, though it only fixes the non-ideal "nolock" case.
ProblemType: Bug
Architecture: amd64
Date: Thu Mar 11 01:18:06 2010
DistroRelease: Ubuntu 10.04
Package: mountall 2.7
ProcEnviron:
LC_COLLATE=C
PATH=(custom, user)
LANG=en_US.utf8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: mountall
Uname: Linux 2.6.32-15-generic x86_64
tags: | added: patch |
Changed in mountall (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in portmap (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in portmap (Ubuntu Lucid): | |
status: | Triaged → Fix Committed |
Changed in mountall (Ubuntu Maverick): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in portmap (Ubuntu Maverick): | |
status: | New → Fix Released |
importance: | Undecided → Medium |
Changed in mountall (Ubuntu Quantal): | |
status: | Incomplete → Triaged |
Changed in mountall (Ubuntu Precise): | |
status: | Triaged → Fix Released |
Changed in mountall (Ubuntu Quantal): | |
status: | Triaged → Fix Released |
Changed in mountall (Ubuntu Raring): | |
status: | Incomplete → Fix Released |
Changed in mountall (Ubuntu): | |
status: | Incomplete → Fix Released |
Changed in nfs-utils (Ubuntu Lucid): | |
status: | New → Won't Fix |
Changed in mountall (Ubuntu Lucid): | |
status: | Confirmed → Won't Fix |
Changed in nfs-utils (Ubuntu Maverick): | |
status: | New → Won't Fix |
Changed in nfs-utils (Ubuntu Precise): | |
status: | New → Triaged |
Changed in nfs-utils (Ubuntu Quantal): | |
status: | New → Triaged |
Changed in nfs-utils (Ubuntu Raring): | |
status: | New → Triaged |
Added a task for portmap; since that ships its configuration file and is responsible for when portmap is started. Since portmap is only on the root filesystem and only doesn't write to it, I think you're probably correct that this should use virtual-filesystems
Obviously the root filesystem needs to depend on *some* events - because something has to start portmap ;-)