[systemd-devel] systemd vs udev automount

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sun Oct 8 11:43:38 UTC 2017


On Sun, Oct 08, 2017 at 12:16:33AM -0700, Paul D. DeRocco wrote:
> I've got a system (actually two similar systems) built with Yocto that use
> systemd, but also have the udev-extraconf package, which includes a udev
> rule and associated mount.sh script for automounting. It's doing strange
> things, like mounting an additional partition on my main disk (which is
> good), and then quietly unmounting it unless it is also listed in
> /etc/fstab (which is bad). When it works, I see systemd messages in
> journalctl about automounting, in addition to the messages generated by
> the udev mount.sh, making me think these two systems are fighting with
> each other. Is it possible that after mount.sh mounts it, systemd kicks
> in, finds it's not in fstab, and unmounts it without logging anything?

systemd will not umount things mounted externally, in general.
In previous systemd versions there were some bugs in this area, and
things did get unmounted; all those bugs have been fixed a while back.
It's hard to say anything more without even knowing what systemd version
you're using, what downstream patches, etc.
udev-extraconf is not a systemd project, so you're probably better off
asking the maintainers of that package.
 
> But if I have systemd, should I even be using the udev automount rules in
> the first place, or should I just create mount and automount units and
> ditch udev-extraconf entirely? (Or are the autonet rules important?) My
> ultimate goal is to have this additional partition on my main disk to be
> automounted as early in the boot process as possible. I don't need (or
> want) removable drives to be automounted anyway.

I don't see why you'd need to use automounting for a partition on the
main disk. Just put it in /etc/fstab in the usual manner, and it'll
get mounted very early in boot.

Zbyszek


More information about the systemd-devel mailing list