NetBSD/dist/am-utils/README.autofs

177 lines
7.7 KiB
Plaintext
Raw Normal View History

# This file is README.autofs
2002-11-30 01:57:11 +03:00
# am-utils-6.1
# Erez Zadok <ezk@cs.columbia.edu> a.k.a. "The Lord of Darkness"
#
2002-11-30 01:57:11 +03:00
# modified by
# Ion Badulescu <ib42@cs.columbia.edu> a.k.a. "The Autofs Master"
** General notes about the autofs support in am-utils
2003-03-09 04:12:05 +03:00
- The autofs code in am-utils is gamma quality for Linux, beta quality for
2002-11-30 01:57:11 +03:00
Solaris 2.5+ and non-working for all the other systems.
- Link, lofs, ufs, nfs, nfsl, and auto mounts were tested and work properly;
2004-11-27 04:00:29 +03:00
the others should work, but were not tested.
2002-11-30 01:57:11 +03:00
* Caveats:
2004-11-27 04:00:29 +03:00
- [this applies to Solaris/IRIX 6/HP-UX/AIX] Amd acts as *both* automountd and
2002-11-30 01:57:11 +03:00
automount. There's no way to distinguish between the two. When amd starts,
it first registers itself as an autofs server (automountd's job), then
parses its own maps, and decides which autofs-type mounts to make
(automount's job). After the autofs mounts are made, amd listens for
requests from the kernel-based autofs, and acts upon them. Since there can
be only one autofs listener on a system, this means that automountd and amd
cannot run at the same time; nor can two amd's run at the same time if they
are both using autofs mounts.
- Linux support is available and fairly stable. Solaris 2.5+ support is
2004-11-27 04:00:29 +03:00
newer and less tested, but seems pretty stable as well. IRIX 6 and HP-UX
2002-11-30 01:57:11 +03:00
autofs support will probably be very easy once we get Solaris 2.5 to work,
as they use the same protocol and almost identical data structures. AIX
seems to be using the Solaris 2.5 protocol as well, but they don't provide
any headers or documentation so getting autofs to work will be tricky at best.
- Killing amd can become a problem if there are active mounts. Since mounts
are done "in place", we can't just unmount our mount points and go away. For
now, amd simply tells the kernel that it is dying; we need to think this
further. It would be nice to "take over" the old mountpoints, there is
support for this in Solaris (due to is RPC nature) and is easy to add to
the Linux kernel (an ioctl on the mountpoint).
2004-11-27 04:00:29 +03:00
- The Solaris 2.5 implementation of the autofs v1 protocol is NON-REENTRANT,
and ignoring this limitation results in a DEADLOCK between the kernel and
the daemon. This is a serious problem, although only for the lofs and link
mount types. In other words, suppose the daemon is trying a lofs/link mount
whose destination crosses another autofs mountpoint. If that mountpoint is
not yet mounted, it will trigger another autofs lookup which will deadlock
inside the kernel -- because the kernel is waiting for the previous request
to return. This is not even something specific to amd, Sun's own automountd
has the exact same problem. Ctrl-C breaks the deadlock, so it's not fatal,
but the lofs/link entry is in effect unusable.
- Solaris 2.8 (at least) doesn't like getting to get out-of-order replies to
mount requests, and ignores the late ones. It's only a minor annoyance (read
delay), because the RPC is retried by the kernel and it succeeds the second
time around.
2002-11-30 01:57:11 +03:00
* Solaris:
- Amd w/ autofs mounts will fight over the listener port with Sun's
2003-03-09 04:12:05 +03:00
automountd, so running both simultaneously is a really bad idea.
2002-11-30 01:57:11 +03:00
- Browsable_dirs is possible and implemented for Solaris 2.6+.
- Direct mounts are implemented and work correctly.
2004-11-27 04:00:29 +03:00
- Host maps are implemented and work correctly.
2002-11-30 01:57:11 +03:00
2004-11-27 04:00:29 +03:00
- On Solaris 2.6+, symlinks over autofs are inefficient. The kernel seems to
time them out immediately after receiving them, so each access to a
symlink causes a call to userspace. Needless to say, this negates the
whole point of using autofs. Automountd seems to always use lofs mounts
instead of symlinks, we do the same unless the admin requests
"autofs_use_lofs = no" in amd.conf.
- Solaris 2.5/2.5.1 do not support symlinks over autofs, so links are always
mounted as lofs mounts, subject to the limitation described in the caveats
section above.
2002-11-30 01:57:11 +03:00
- Restarting autofs mounts is possible, but not yet implemented.
* Linux:
- Amd should work fine even when the Linux automounter is running, the
mechanism being used prevents any kind of (evil) interaction between them.
- Browsing is not available if autofs support is used, due to limitations in
2004-11-27 04:00:29 +03:00
the kernel<->daemon protocol used by Linux 2.2 and 2.4. Only already-mounted
2002-11-30 01:57:11 +03:00
nodes will appear in the autofs directory, and this is implemented entirely
in the kernel.
2004-11-27 04:00:29 +03:00
- Host maps are supported with all autofs versions.
2002-11-30 01:57:11 +03:00
- Direct maps cannot be supported since there is no kernel support for them;
we might be able to get something eventually, but don't hold your breath.
If anything, we may do it using a regular NFS mountpoint and bind-mount on
top of it.
- Inherit doesn't make much sense because we can't restart a hung autofs
mount point, due to kernel limitations. This needs to be fixed in the
Linux kernel; it's not particularly difficult, and we might provide a
patch at some point.
- Link (and lofs) mounts will use the new bind-mount support in Linux
2.4+. No more symlinks! And /bin/pwd works great too.
2004-11-27 04:00:29 +03:00
- Auto maps are actually mounted as a separate autofs filesystem. Since each
autofs filesystem consumes 2 file descriptors, and amd has at most 1024
file descriptors available, there can be at most 512 of them mounted at
the same time. Because of this, extensive use of auto maps is discouraged
when using autofs on Linux.
* amd.conf requirements:
2002-11-30 01:57:11 +03:00
To tell amd to use an autofs-style mount point and mounts for a map, add
mount_type = autofs
2002-11-30 01:57:11 +03:00
either to the global section, or to the sections of the individual maps you
selected. Mixing autofs and normal amd mount points in the same amd.conf
file *does* work.
* Map changes:
2002-11-30 01:57:11 +03:00
No changes are necessary. If a map is marked as autofs in amd.conf, mounts
are done "in place" and the "fs" parameter is ignored most of the time.
* Todo:
2002-11-30 01:57:11 +03:00
We are looking for volunteers to improve the autofs code!
2002-11-30 01:57:11 +03:00
(1) These fixes are needed:
2004-11-27 04:00:29 +03:00
- sublinks are broken
- when the mount type is 'link', transparently translate it into a loopback
file system mount (lofs), that would mount in place, rather than supply a
2002-11-30 01:57:11 +03:00
symlink, at least on systems whose autofs doesn't support symlinks. Linux
does support symlinks, Solaris 2.6+ does too, but Solaris 2.5/2.5.1 doesn't
2004-11-27 04:00:29 +03:00
and neither does IRIX 6. Moreover, Sun's automountd always uses lofs for
2002-11-30 01:57:11 +03:00
link mounts, even on 2.6+, because symlinks are not cached in the kernel and
2004-11-27 04:00:29 +03:00
thus are not particularly efficient. [done]
2002-11-30 01:57:11 +03:00
- complain if certain incompatible options (autofs and ...) are used. Direct
2004-11-27 04:00:29 +03:00
maps on Linux is one such case of incompatible options. Browsable_dirs on
2002-11-30 01:57:11 +03:00
Linux is another such case.
- if amd is killed or dies, the autofs mounts will remain intact as required
2002-11-30 01:57:11 +03:00
(your system is _not_ hung, yay!). However, if you restart amd, it will not
correctly 'restart' the autofs mounts as the Sun automounter does. Rather,
2002-11-30 01:57:11 +03:00
it might cause another mount to happen, which leaves your /etc/mnttab
cluttered with older mounts entries which cannot be unmounted. It might also
just pretend everything is ok, when in fact it isn't.
(2) Code expansion:
2002-11-30 01:57:11 +03:00
- [Solaris only] implement the sockets version of amu_get_autofs_address()
and create_autofs_service(), in conf/transp/transp_sockets.c. Not sure if
2004-11-27 04:00:29 +03:00
it's necessary, Solaris it still biased towards TLI/STREAMS in
userspace. [mostly done, untested, might be used on AIX 5.x+ and IRIX 6]
2003-03-09 04:12:05 +03:00
- Implement the restarting of autofs mount points. This is already doable on
Solaris; on Linux, the kernel needs to be patched to allow it.
(3) Testing and porting to other systems:
2004-11-27 04:00:29 +03:00
- nothing has been tested on IRIX 6, which reportedly has a similarly
functioning autofs to Solaris 2.5. The code compiles, but has not been run
yet and is most likely broken.
2003-03-09 04:12:05 +03:00
- support for Linux autofs is stable, we need testers!
2002-11-30 01:57:11 +03:00
- support for Solaris 2.6+ is pretty stable, so we need testers for it, too!
2003-03-09 04:12:05 +03:00
- we did not test any version of Solaris on x86. It will probably work, but
you have been warned. Testers are welcome.