Discussion:
Struggling with amd(8) on NetBSD
(too old to reply)
Volker Borchert
2012-03-18 15:47:36 UTC
Permalink
Hi all

I am trying to set up amd(8) to automount server:/{home,tools,archive}
as /{home,tools,archive}, on a machine running NetBSD-1.5.1 (pretty old,
yes, but I don't want to touch a running system) without any success.
All references and tutorials I could find on the net seem to include
examples that would mount them as /net/{home,tools,archive} but that is
not what I want. Is what I want to do possible at all with amd(8), and
if so, how?

I know that it was possible with SunOS's automount(8). Is there a port
of this (or something compatible with it) to NetBSD?

Regards
Volker
--
"I'm a doctor, not a mechanic." Dr Leonard McCoy <***@ncc1701.starfleet.fed>
"I'm a mechanic, not a doctor." Volker Borchert <***@despammed.com>
Robert Bonomi
2012-03-19 06:39:28 UTC
Permalink
Post by Volker Borchert
Hi all
I am trying to set up amd(8) to automount server:/{home,tools,archive}
as /{home,tools,archive}, on a machine running NetBSD-1.5.1 (pretty old,
yes, but I don't want to touch a running system) without any success.
All references and tutorials I could find on the net seem to include
examples that would mount them as /net/{home,tools,archive} but that is
not what I want. Is what I want to do possible at all with amd(8), and
if so, how?
I haven't worked with amd in a long time, but I _think_ it requires
a virtual 'mount point', where everything it manages appears 'under'
that directory node.

HOWEVER, one can create symlinks elsewhere in the filesystem that point
to the actual directories under the amd 'mount point'.

This gives the 'effect' of what you're trying to do, albeit not the
specific methodology.
Volker Borchert
2012-03-20 23:02:08 UTC
Permalink
Post by Robert Bonomi
HOWEVER, one can create symlinks elsewhere in the filesystem that point
to the actual directories under the amd 'mount point'.
The downside symlinks is that they need special care with tools like
df, du, find, ...

Should I get sufficiently desperate and/or bored, I might try to either
- get SunOS 4.1.4 automount to run in NetBSD's emulation mode
- get OpenSolaris automount to compile and run on NetBSD
--
"I'm a doctor, not a mechanic." Dr Leonard McCoy <***@ncc1701.starfleet.fed>
"I'm a mechanic, not a doctor." Volker Borchert <***@despammed.com>
Ignatios Souvatzis
2012-03-22 08:00:08 UTC
Permalink
Post by Volker Borchert
Post by Robert Bonomi
HOWEVER, one can create symlinks elsewhere in the filesystem that point
to the actual directories under the amd 'mount point'.
The downside symlinks is that they need special care with tools like
df, du, find, ...
You could get away with null mounts instead of symlinks. However- you'd
lose the "auto" aspect, I guess, because the null mount would access the
target, ths trigger the automount.

You could, of course, chroot into the mount point for your main
applications ;-)
Post by Volker Borchert
Should I get sufficiently desperate and/or bored, I might try to either
- get SunOS 4.1.4 automount to run in NetBSD's emulation mode
Unfortunately, I don't know if this works. Once upon a time, I had booted
NetBSD/sparc (32; no 64 back then) and run SunOS 4.1.4's Xsun in it. But
that was long ago. I don't know about NetBSD-1.5; I did have massive problems
when I tried to setup Solaris/8 emulation on NetBSD/sparc64 5.99.45 (more or
less); not even "date" would run. I guess a lot of work would be needed to
repair or enhance the emulation.

Wait -you explicitly mention SunOS 4.1.4! Maybe SunOS4 still works!
A report to the NetBSD mailing lists (port-sparc) would be appreciated!
(Hm, so I should dig out old SunOS4 backups ...)
Post by Volker Borchert
- get OpenSolaris automount to compile and run on NetBSD
If you manage to do this: there's a certain interest in the community, as
some people prefer automount's administration over amd! This would be much
appreciated, too.

Regards,
-is
--
seal your e-mail: http://www.gnupg.org/
Tristram Scott
2012-03-21 16:29:09 UTC
Permalink
Post by Volker Borchert
Hi all
I am trying to set up amd(8) to automount server:/{home,tools,archive}
as /{home,tools,archive}, on a machine running NetBSD-1.5.1 (pretty old,
[snip]

I am not sure about NetBSD, but under solaris the idea is this:

In /etc/auto_master, have a line referring to a direct map file:

+auto_master
/net -hosts -nosuid,nobrowse
/home auto_home -nobrowse
/- auto_direct

In auto_direct, list your keys and the associated filesystems:

/somedir somehost:/export/somedir
/anotherdir anotherhost:/theotherdir

You may need to restart the automountd process or some of its friends.

The important thing seems to be that you use auto_master to list the names
of map files, so auto_home and auto_direct for the example above, and then,
in the map files (/etc/auto_direct) you list the mappings. For direct
mappings, you need to use the /- key in auto_master. direct mappings are
what you want here, as they specify absolute paths, not relative ones.

Man automount (1M) has the explanation under Solaris.
--
Dr Tristram J. Scott
Energy Consultant
Volker Borchert
2012-03-21 22:51:56 UTC
Permalink
Post by Tristram Scott
Post by Volker Borchert
I am trying to set up amd(8) to automount server:/{home,tools,archive}
as /{home,tools,archive}, on a machine running NetBSD-1.5.1 (pretty old,
[snip]
Been there, done it, with both 4.1.4 and 5.8 automount. But these are
very different from *BSD's amd(8). The problem is that this box has to
act as syslog server for *BSD and therefore must (?) run *BSD because
its syslogd has to know about *BSDs' additional facilities.

In SunOS terms, what I'm looking for is how to configure something like
auto.direct for amd(8). Or a port of automount(8/1M) to NetBSD.
Post by Tristram Scott
[ ... detailed description of auto.direct ... ]
Man automount (1M) has the explanation under Solaris.
I do have the O'Reilly book "Managing NFS and NIS" ;-)
--
"I'm a doctor, not a mechanic." Dr Leonard McCoy <***@ncc1701.starfleet.fed>
"I'm a mechanic, not a doctor." Volker Borchert <***@despammed.com>
Loading...