Automounting with amd

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Automounting with amd

Predrag Punosevac-2
Hi misc,

I have a question about amd daemon. I recently rebuilt the main file
server for our university lab and decided to use separate ZFS datasets
for user home directories. Our main file server runs 11.1-RELEASE-p11.
That creates a bit of a problem as each home directory has to be a
separate NFS mount. For more detailed description I will refer you to
the summary I wrote a while ago

https://forums.freebsd.org/threads/nested-children-zfs-datasets-and-nfs-exports-for-recursive-mount.63411/

Long story short unlike few startups for which I originally implemented
the setup our shell gateways run OpenBSD (clients over there were RHEL
machines and you guessed I used autofs daemon to mount home directories
per request instead of /etc/fstab).

I am trying to accomplish the same on OpenBSD but I am going nowhere so
far.

lop1# uname -a
OpenBSD lop1.int.autonlab.org 6.3 GENERIC.MP#4 amd64

lop1# more /etc/amd/master
/home   amd.home

lop1# more /etc/amd/amd.home
/defaults type:=host;sublink:=${key};opts:=rw,noatime,-a=4,vers=3,proto=tcp,nosuid,nodev
*
rhost:=gaia.int.autonlab.org;rfs:=/storage/zfsauton2/home/ewinston

I do launch daemon as

amd -a /zfsauton2

but I get amd:38887 on /zfsauton2/home type nfs (v2, udp, intr,
timeo=100, retrans=101)

version 2 of NFS protocol which tells me that none of my configuration
files has been read.

What I would like to accomplish is have one line per user and create on
the fly mount point on /zfsauton2/home which does exist on OpenBSD
client and then mount remote file system to it. Is that possible with
amd? If not I will just write a script and create fake user directories
on the shell gateway instead of mounting over a hundred remote NFS
directories.

Best,
Predrag

Reply | Threaded
Open this post in threaded view
|

Re: Automounting with amd

Stuart Henderson
On 2018-06-26, Predrag Punosevac <[hidden email]> wrote:

> Hi misc,
>
> I have a question about amd daemon. I recently rebuilt the main file
> server for our university lab and decided to use separate ZFS datasets
> for user home directories. Our main file server runs 11.1-RELEASE-p11.
> That creates a bit of a problem as each home directory has to be a
> separate NFS mount. For more detailed description I will refer you to
> the summary I wrote a while ago
>
> https://forums.freebsd.org/threads/nested-children-zfs-datasets-and-nfs-exports-for-recursive-mount.63411/
>
> Long story short unlike few startups for which I originally implemented
> the setup our shell gateways run OpenBSD (clients over there were RHEL
> machines and you guessed I used autofs daemon to mount home directories
> per request instead of /etc/fstab).
>
> I am trying to accomplish the same on OpenBSD but I am going nowhere so
> far.
>
> lop1# uname -a
> OpenBSD lop1.int.autonlab.org 6.3 GENERIC.MP#4 amd64
>
> lop1# more /etc/amd/master
> /home   amd.home
>
> lop1# more /etc/amd/amd.home
> /defaults type:=host;sublink:=${key};opts:=rw,noatime,-a=4,vers=3,proto=tcp,nosuid,nodev
> *
> rhost:=gaia.int.autonlab.org;rfs:=/storage/zfsauton2/home/ewinston
>
> I do launch daemon as
>
> amd -a /zfsauton2
>
> but I get amd:38887 on /zfsauton2/home type nfs (v2, udp, intr,
> timeo=100, retrans=101)
>
> version 2 of NFS protocol which tells me that none of my configuration
> files has been read.

amd acts as an NFS server itself, that's how it is hooked into the normal
OS filesystem. The line above is showing the local mount to the 'magic'
directory provided by amd.

amd's built-in NFS server is v2-only, regardless of what the 'backing'
mount uses (either a remote NFS mount, or a mount to a local device such
as a CDROM or an device with an FFS filesystem that you don't want to
leave mounted all the time).