[systemd-devel] mount unit with special requirements
Martin Wilck
mwilck at suse.de
Mon Sep 10 11:58:36 UTC 2018
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
suggestion would be to create a dedicated script (or systemd service,
for that matter) that would mount the file system, start the backup,
and unmount / freeze the file system when the backup is done.
Regards,
Martin
More information about the systemd-devel
mailing list