Red Hat Bugzilla – Bug 129311
Direct map support in v4 might break working config
Last modified: 2007-11-30 17:07:03 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.4.2)
Description of problem:
Strating to support direct maps in version four is of course mostly an
enhancement. But since direct maps work differently than on other
systems, it might actually break things. This happens if there are
other mounts under the same top-level directory.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Enter "/- auto.direct -rw,intr" and "/nfs/vm auto.vm -rw,intr" in
2. Enter "/nfs/ipatinga/src ipatinga:/lfs/src" into auto.direct.
3. Enter "cvs lehrter:/lfs/vm/&" into auto.vm.
Actual Results: With autofs 3 the direct map is ignored.
/nfs/ipatinga/src is not available while /nfs/vm/cvs is.
With autofs 4 the direct map is used, and replaces the entire /nfs
tree. /nfs/ipatinga/src becomes available, but /nfs/vm/cvs disappears.
On other systems (Solaris, HP-UX, AIX) both directories are available,
since not the whole tree is taken. Adding support for direct mounts
certainly is a good thing. Adding it in a different way than used on
other systems, is unfortunate, but better than nothing. Applying that
change between two update releases is slightly questionable though.
We had of course done workarounds on our Linux systems to cater for
the lack of support for direct maps. We can certainly figure out some
other workaround for the different behaviour in treatment of direct
maps in the new version. While I would count on having to do that
kind of work for an upgrade to RHEL4, I would not expect it for an
An idea would be to have an easy way to disable the direct maps. Then
you could choose if you want the new functionality, or prefer it the
old way. This could be a switch in /etc/sysconfig/autofs; if the
variable is set, the /etc/rc.d/init.d/autofs would skip /- entries in
This kind of patch could be kept for the RHEL3U* releases, and removed
Yes, this point has been bothering me. I put together a new package
which disables direct support by default. You can enable it by setting
Thanks for the report. I will update the bug when the new package is
I see this is implemented in U3.
I'm slightly surprised by the test used.
if [ $DISABLE_DIRECT -eq 1 \
-a x`echo $dir | grep -E "^/-"` != 'x' ]
Wouldn't it have been simpler and still correct to just say like this?
if [ $DISABLE_DIRECT -eq 1 -a x$dir = x/- ]
A difference would be that this would not remove a dir of the form
"/-xxx". But should that really be removed?
Anyway, the delivered fix works, so I close this.