Redirected from page "AutomountHelp"

Clear message

AutoMount seems to be making somewhat of a come back as directory services become more and more common.

See also: OpenLdap

Contents

Software

AutofsNG
AutofsNG is intended to be completely interoperable with autofs implementations on other Unix platforms. As such, it supports some features that the current Linux automounters do not. This includes direct mounts, /net (--hosts access), lazy mounting and unmounting of hierarchical multimounts, and browsing. It also supports the usual indirect map support available elsewhere. Maps are supported from flat files, executable maps, NIS maps, NIS+ maps, LDAP maps, and hesiod (DNS) filsys namespace.

http://waychison.com/autofsng/

Automount and OSX

Automount in AppleOsx is similar in concept but quite different in detail from Linux or Solaris automount.

Automount and Darwin
Good general information about how the automounter works under OSX and Darwin.

http://www.opendarwin.org/documentation/automount.php

NIS and Automount in OSX
Good article including lots of documentation on the nitty gritty of how automount works including documentation on the nefarious -net mount option.

http://www.bresink.de/osx/nis.html

General Linux Background

From a message sent to the LinuxManagers mailing list by AdamShand.

> I'm looking for some advice or a pointer to relevant documentation here 
> (which I've so far been unable to find).  I inherited a mixed Solaris
> 2.5/8 Linux (Redhat 7.x and Debian) environment which uses NIS as the
> naming scheme (yes I know NIS is bad that it's way it is).
> 
> The Linux part is relatively  new and I've been integrating it into the
> NIS enviroment.  The one stumbling block I've found (once I got over MD5
> vs crypt) is that automount appears to use a totally different syntax
> under Linux then Solaris.  Is it possible for these files to be shared
> between Linux and Solaris?  If so should I use automount or AMD?
> 
> Any words of advice would be appreciated and I will summarize.

Apologies for the *very* late summary, I got swamped by work and then went on vacation. Ravi Channavajhala, Gustavo Chaves and sysadmin.astro.su.se were kind enough to reply.

Things worth knowing.


More information.

Some useful oneliners:

ypcat -k auto.direct | awk '{system("mkdir -p -m 755 " $1); mntopt=substr($2,2) " " $3 " " $1; system("mount -o " mntopt)}'
To manually mount all filesystems listed in the NIS map auto.direct:
mount | awk '/ nfs / {system("umount "$3)}'
Manually unmount all NFS filesystems.


I've been struggling with this same problem. One idea I've tried which seems to work ok is running both amd and autofs at the same time. Just have amd manage /net and /home, and autofs do the other maps, which I get from NIS. Seems to work ok. One caveat: you need to have an /etc/auto.master which just contains

to make autofs skip that mount so amd can grab it instead.

--PhilHollenback

Redhat Tweaks

So autofs4 is really the only version of Linux automount that is worth running, however RedhatLinux still doesn't ship version 4 by default and the packages on the software's homepage is so old that it won't run on modern versions of Redhat. So ... that means you need to rebuild the source RPM's and make some minor tweaks. Here's the cheat list (see UsingRpm for how to rebuid a source RPM):

In order for /net to work properly with a NetworkAppliance file server you need to add nostrict to the default mount options:

The default run level priority starts autofs too soon for modern RedhatLinux systems, you need to bump it to 99

Unless you need it comment out the /misc map:

The package build will fail due to the different location of the init.d scripts so you need to update the spec file and change all instances of rc.d/init.d to init.d):

Finally remember that autofs4 requires the autofs4 kernel module to be loaded instead of the default autofs one. Make sure that you add an alias:

Useful Links


CategorySoftware

AutoMount (last edited 2005-03-15 20:45:29 by AdamShand)