automount doesn't work with NFS root
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
autofs (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: autofs
Description: Ubuntu 8.04
Release: 8.04
autofs:
Installed: 4.1.4+debian-
I use autofs on a diskless machine which mounts / over NFS. In Ubuntu's autofs, the patch:
debian/
is applied, which causes automount to refuse to create the mount-point if it is not on a local filesystem (it decides this based on parsing /etc/mtab). Unfortunately, this change is not reflected in the documentation, which still reads:
mount-point
Base location for autofs-mounted filesystems to be attached. This is a
So, it is a surprise that when I run autofs with an NFS root, if the mount-point does not exist when automount starts, it just logs:
automount[8821]: failed to create iautofs directory /nfs
and exits. So, at the very least, the documentation should be updated, and it should give an appropriate error message indicating why it refuses to create the mount-point.
But this problem is exacerbated by the fact that the patch as written will still happily cause a remote mount-point to be removed on exit, regardless of whether it created it or not. So if the mount-point is on NFS, and exists, then automount will start, and upon exit, remove the mount-point, and will therefore fail to start a second time.
In trying to devise a solution to this problem, I was stumped by the lack of documentation, comments, or even a general description associated with the 077_dont_
Perhaps the best solution is to add a new option to automount that would govern the behavior of creating the mount-point.
Changed in autofs: | |
status: | New → Confirmed |
This change to /etc/init.d/autofs fixes it