I don't know about systemd automounter. In general, I prefer to not rely on systemd-* tools because systemd is often too smart to be useful. Besides, autofs is still a better solution if maps are distributed over network, say via NIS.
]]>Have always done a loopback mount (lofs) via the automounter (on illumos, which is SunOS 5.11),
but I'm having difficulties getting sub file systems going.
Manually, things seem to mount fine.. e.g. #mount --rbind /export/home/richard /mnt
will pick up my 'home' filesystem and child 'src' file system like it should.
But in the automounter, it doesn't... using:
>* --rbind,defaults :/export/home/&
For pub, though I'd try /etc/fstab with the following line:
>/export/pub /pub none rbind,defaults,nofail,x-systemd.requires=zfs-mount.service 0 0
and it seems to work fine (and is okay for this shared system directory).
So, how to get the auto home mounter to work?
As these *are* nfs shared directories, I hope resorting to local nfs use isn't the only answer for obvious reasons.
[added a bit later]
I happened to come across a mention of the systemd automounter, so I gave the following a shot:
># remap zfs (and nfs shared) /export/home and /export/pub locally
>/export/home /home none rbind,defaults,noauto,x-systemd.automount,x-systemd.requires=zfs-mount.service 0 0
>/export/pub /pub none rbind,defaults,noauto,x-systemd.automount,x-systemd.requires=zfs-mount.service 0 0
(NB: dpool/export/home needs zfs property 'canmount=off')
seems to be okay... is this the 'right' way instead of autofs?
]]>