[systemd-devel] Suppressing automounting
Tobias Geerinckx-Rice
tobias.geerinckx.rice at gmail.com
Tue Sep 16 22:18:26 PDT 2014
Hallo,
On 14 September 2014 19:49, Andrei Borzenkov <arvidjaar at gmail.com> wrote:
> В Thu, 11 Sep 2014 21:53:27 +0200
> Tobias Geerinckx-Rice <tobias.geerinckx.rice at gmail.com> пишет:
>>
>> From my reading of the thread, this is to emulate as closely ye olde
>> initscripts' unreliable and flawed behaviour of attempting to mount
>> one or more devices exactly once (i.e., a one-shot "mount -a"), but
>> not until an arbitrary time-out has elapsed after which all external
>> devices are blindly assumed to have been initialised for no good
>> reason.
>
> This thread is not about "blindly assuming" anything.
Indeed it isn't. But the traditional application of fstab was. Badly [1].
That's not to say that it didn't happen to work most of the time. I
just hoped systemd could do better. I still do.
> Actually, it is systemd which blindly assumes user wants to
> always mount device as soon at it appears.
The device is in fstab, marked 'auto'. I submit that's closer to a
reasonable assumption than a blind one -- however...
>> This isn't hard to achieve with systemd,
>
> In case you missed it - it is impossible to achieve with systemd right
> now. At least, it is impossible to achieve what the goal of OP was -
> attempt to automount device exactly once on system boot and give up if
> it was not successful.
...yeah. Sorry. Quick story: for some unholy reason, the vintage Arch
VM I last used to test this always did the Right Thing:
- Add a nofail fstab line, boot with the device present.
- Verify that it was 'auto'-mounted. umount and (physically) unplug it.
- Plug it back in. The device has the same path and active unit.
- Yet nothing is mounted. All is well, if you like it that way.
Now, of course, that VM is gone. And now, with exactly the same
(logged) commands, the device is indeed silently mounted. Every time.
Even with old systemd.
Grr.
Now: is always mounting better than the old behaviour? -- Still think so.
Is it different from how everyone historically expects fstab to work,
and therefore confusing as hell until either properly documented or
(meh) made configurable? -- Hell yes.
Regardless: sorry for any noise!
T G-R
[1]: Lennart's remark, 'a concept of "mount at boot if it is there,
otherwise don't"
cannot work' <https://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg21973.html>,
isn't theoretical: it regularly broke on some dodgy hardware I'm
thankful to no longer own.
To paraphrase the OP: It never *really* worked. I don't want it back.
More information about the systemd-devel
mailing list