systemd automount expiration

Latest response

We use a lot of automounts at school, as our myriad of students roam from system to system, and were using the automounter to automount their home directory on a LAN using the automounter. No problem. Under RHEL6, the mounts cycled through and went away eventually after the student had logged off. Just what we needed.

As we switch to 7 I notice that the automounted directories do not timeout and get un-mounted. In fact, even if the system is rebooted the automounted directory is remounted. This results in many machines having 20 or 30 unused mounted directories, all from our same server. Not so good.

I thought this might have been a local bug in some configuration I was missing. Then I saw this line on a posting to the systemd-devel list:
Hmm? The systemd automount logic so far does not support mount expiration,...

So, I have a few questions:

  1. I am afraid of letting these mounts accumulate, as I worry about the server. Is this a problem ("What, me worry?")

  2. I can write a script that umounts all the unneeded directories nightly. That shouldn't be a problem, except for the fact that I have to do it.

  3. Can I still use the automounter (which supports mount expiration nicely) directly on 7, or does systemd always convert the autmount configuration into a systemd.automount unit?

Is there anything else I'm missing?

Thanks for any input.

Responses

After being away for a few weeks I had a day to try to debug this and found out some new data. Since we fortunately were using NFSv3 I could track the mounts on the server (does anyone know how to get NFSv4 to generate mount/umount messages on the server?)
1. the mounts are, indeed, expiring, but they are being remounted periodically.
2. the remounts occur everytime someone logs on or off. (a login occurs - all directories that have ever been automounted for any user are mounted. ten minutes later they expire and umount (except the one that is in-use). When the user logs off, all the mounts are remounted, then they expire again. sheesh.
3. this behavior ceases if ypbind is stopped

Thus it is some interaction between NIS and automount under systemd that is causing the problem. (or it is a problem in the new version of ypbind on RHEL7)

The problem does not occur on our RHEL6.6 machines.

I have a partial workaround - doing a direct mount of the root of the home directories instead of automounts of individual directories. one extra mount/umount for each login or logoff is not so onerous.

Anyone have any ideas? (I know, dont use NIS, but its really simple in our protected environment. Constantly creating, modifying and deleting LDAP entries automatically is much more complicated.)

Also, if anyone knows how to get NFSv4 to generate mount/umount messages on the server I'd like to know (or where it is - its not in messages anymore) (the server is RHEL6.6)

Thanks for any input.

btw, since we have academic licenses only I cant submit a bug report on this (the last time I did this it was rejected. (You'd think RH would want to know about bugs from any source.)) If one of you Redhat guys wants to submit it, I'd appreciate it.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.