Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Struggling with amd(8) on NetBSD

46 views
Skip to first unread message

Volker Borchert

unread,
Mar 18, 2012, 11:47:36 AM3/18/12
to
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 <mc...@ncc1701.starfleet.fed>
"I'm a mechanic, not a doctor." Volker Borchert <v_bor...@despammed.com>

Robert Bonomi

unread,
Mar 19, 2012, 2:39:28 AM3/19/12
to
Volker Borchert <v_bor...@despammed.com> wrote:
>
>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

unread,
Mar 20, 2012, 7:02:08 PM3/20/12
to
Robert Bonomi wrote:

> 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

Tristram Scott

unread,
Mar 21, 2012, 12:29:09 PM3/21/12
to
In comp.sys.sun.admin Volker Borchert <v_bor...@despammed.com> wrote:
> 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

unread,
Mar 21, 2012, 6:51:56 PM3/21/12
to
Tristram Scott wrote:
> In comp.sys.sun.admin Volker Borchert <v_bor...@despammed.com> wrote:
> > 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:

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.

> [ ... detailed description of auto.direct ... ]
>
> Man automount (1M) has the explanation under Solaris.

I do have the O'Reilly book "Managing NFS and NIS" ;-)

Ignatios Souvatzis

unread,
Mar 22, 2012, 4:00:08 AM3/22/12
to
Volker Borchert wrote:
> Robert Bonomi wrote:
>
>> 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 ;-)

>
> 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 ...)

> - 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/
0 new messages