[systemd-devel] mount unit with special requirements

Lennart Poettering lennart at poettering.net
Mon Sep 10 20:54:09 UTC 2018


On Mo, 10.09.18 20:53, Michael Hirmke (mh at mike.franken.de) wrote:

> Hi,
> 
> >On Mon, 2018-09-10 at 09:55 +0200, Michael Hirmke wrote:
> >>
> >>>>
> >>>>> (I would just use `umount /var/backup`, however.)
> >>>>
> >>>> Can't do that as long as the mount unit is under systemd control.
> >>>> A few seconds later systemd remounts it on its own.
> >>>>
> >>> "noauto" mount option?
> >>
> >> This would prevent it from being mounted at startup, which is
> >> necessary.
> 
> >If you leave out "noauto", you're telling systemd to mount the file
> >system when it's ready. You said you didn't want that. From your
> >problem description, I'd infer that this file system needs to be
> >mounted only at certain times (while the backup is running). My
> 
> No, I wrote:
> 
> *- The partition has to be mounted on boot.*

Well, what does that mean? Do you just want the path to be available?
if so, that's what an automount unit will do for you without actually
mounting the superblock. Or do you want the superblock to be hooked in
already? If so, why? Why wouldn't the automount be good enough?

> - It has to be unmounted before the nightly copy job, so that an fsck
>   can be performed.

Well, but why would you do that. Why isn't it enough to run the fsck
once before the first mount after each time the device initially
appeared?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list