[systemd-devel] Suppressing automounting
Dale R. Worley
worley at alum.mit.edu
Fri Aug 29 08:24:28 PDT 2014
> From: Mantas Mikulėnas <grawity at gmail.com>
> For fstab, the units are created by a 'generator'
> (systemd-fstab-generator), which writes them under /run/systemd/generator
> every time the configuration is reloaded.
>
> I'm not at my PC right now so I cannot check, but I /do/ remember someone
> mentioning that if a fstab entry has the 'auto' option, then the generator
> also symlinks the corresponding .mount unit under <devpath>.device.wants/
> (e.g. dev-sda3.device.wants/mnt-backup.mount), causing the .mount unit to
> be triggered *every* time that device appears on the system.
>
> That is, in addition to local-fs.target triggering foo.mount and waiting
> for bar.device one time only (as you describe), it makes bar.device itself
> trigger foo.mount every time as well.
Thanks for the information!
I finally thought to do "man -k fstab" to see if it turned up
anything, and I found the manual page for "systemd-fstab-generator",
which references "systemd.mount", which tells me that I'm not the
first person with this complaint:
When reading /etc/fstab a few special mount options are
understood by systemd which influence how dependencies are
created for mount points from /etc/fstab. [...] If
x-systemd.device-timeout= is specified it may be used to
configure how long systemd should wait for a device to show up
before giving up on an entry from /etc/fstab. Specify a time in
seconds or explicitly specify a unit as s, min, h, ms.
I haven't tried this yet, but it should suffice for my problem.
Dale
More information about the systemd-devel
mailing list