On Tue, Nov 29, 2022 at 09:27:26PM +0100, Steinar H. Gunderson wrote:
> On Tue, Nov 29, 2022 at 11:31:39AM -0800, Ross Vandegrift wrote:
> >> Subject: Bug#1025099: plocate: autofs pruning doesn't seem to work
> > That subject wasn't too clear- updatedb.plocate does not index the
> > remote filesystem, it just triggeres the automount unnecessarily.
> 
> I don't think that's possible to avoid; the directory must be stat()-ed
> to get to know what type of filesystem it is, and I guess that would trigger
> the mount?

Interesting - stat -f does the same, and it always returns nfs.  Here's
a lame idea: /proc/mounts knows it's actually autofs...

But if there's no non-hacky way to filter out unmounted autofs mounts
early, I'm not sure this is worth fixing.  The only impact is delayed
updates when e.g. I'm not home and so the nfs won't mount.  Shortening
the mount timeout should help with that.

> I guess it's an interesting question why it even knows how to enter that
> directory, if it's not mounted; are you running with ghost on?

I'm using a systemd automount unit.  There's no autofs config or ghost
option, but the effect is similar:
  systemd-1 on /mnt/storage type autofs
  vanvanmojo.lan:/mnt/storage on /mnt/storage type nfs4

The first is created when the unit is started, the second after
automounting is triggered.

Ross

Reply via email to