[CentOS] more questions on setting up autofs on C7

Fred Smith fredex at fcshome.stoneham.ma.us
Wed Aug 23 20:06:34 UTC 2017


On Wed, Aug 23, 2017 at 12:03:12PM -0700, Gordon Messmer wrote:
> On 08/21/2017 07:23 PM, Fred Smith wrote:
> >so, in my case, the USB drive contains an xfs filesystem. would I
> >do something like this:
> >
> >in /etc/auto.master:
> >backup /etc/auto.backup
> >
> >and in /etc/auto.backup
> >backup -fstype=xfs,defaults,noauto,users :UUID=09bfc97a-8db2-46de-b4dd-427da19b114
> 
> In auto.master, the first field is a directory, so it should be "/backup".
> 
> Debian's documentation says you shouldn't need to prefix UUID with a
> ':', so remove that from auto.backup if the configuration you
> described doesn't work.  Alternatively, you could specify its
> location as ":/dev/disk/by-uuid/<the disk id>".

Ok, when I actually tried it, I did it this way:

/etc/auto.master (excerpt):

	/mnt /etc/auto.mnt

and /etc/auto.mnt:

	backup -fstype=xfs,defaults,noauto,users,rw :UUID=09bfc97a-8db2-46de-b4dd-427da19b1143

and lo and behold, it works!

but...

I have a couple of other networked filesystems (cifs) that I have always
mounted in /mnt. so, after accessing either of them, systemctl status autofs
shows me this:

Aug 23 15:46:02 fcshome.stoneham.ma.us systemd[1]: Starting Automounts filesystems on demand...
Aug 23 15:46:02 fcshome.stoneham.ma.us automount[11265]: setautomntent: lookup(sss): setautomntent: No such fil...ory
Aug 23 15:46:02 fcshome.stoneham.ma.us systemd[1]: Started Automounts filesystems on demand.
Aug 23 15:50:04 fcshome.stoneham.ma.us automount[11265]: key "syno-fredex" not found in map source(s).
Aug 23 15:50:04 fcshome.stoneham.ma.us automount[11265]: key "syno-public" not found in map source(s).

the first error regarding setautomntent seems to be pretty universal,
as I see lots of questions about it (and bugs filed against Fedora and
RHEL) but no actual solution. the consensus is that it doesn't seem to
prevent autofs from working. (there is a workaround that I haven't
tried, and mention of a patch to sssd that I also haven't tried, and
which apparently hasn't made it into RHEL 7.3 or Centos7.x).

so, the two lines saying: Key "syno-fredex" or key "syno-public"
appear whenever I try to access one of those two filesystems. I AM NOT
USING AUTOFS TO MANAGE THEM. they were mounting in /mnt, just like the
automount I was asking about. thinking since autofs was looking in /mnt
for the backup mount that it was getting all confuzzled, I changed the
mount point of those other two filesystems, changed their entries in
/etc/fstab, reran systemctl restart autofs then touched one of those cifs
filesystems. Voila! the errors still appear in the output of systemctl
status autofs.

Everything still appears to work, but I'm puzzled by those two errors.

Anyone got any good ideas on this?

thanks in advance!

Fred
-- 
---- Fred Smith -- fredex at fcshome.stoneham.ma.us -----------------------------
               But God demonstrates his own love for us in this: 
                         While we were still sinners, 
                              Christ died for us.
------------------------------- Romans 5:8 (niv) ------------------------------



More information about the CentOS mailing list