[systemd-devel] systemd 210 - mount/umount/remount

Michael Hirmke camping at mike.franken.de
Fri Oct 14 10:06:00 UTC 2016

Hi *,

I've read the man pages and some more documentation about the mount
behaviour of systemd, but I couldn't find a definitive answer to my
I have a backup script, that copies all files to backup to a hard disk
partition, then duplicates the partition to one on a second disk, which
in turn is changed every day. Before duplicating, the script tries to
umount the partition on the original disk, does an fsck and then mounts
the partition read only. When duplicating is finished, the original
partition is remounted read write again.
The script uses the "ancient" mount and umount commands, but once in a
while, systemd takes over and remounts the disk, before fsck has been
So my questions are:

1. How can I prevent systemd from mounting a manually unmounted
   partition? The partiton should be mounted automatically during system
   start, though.
2. If I would switch from mount/umount to pure systemd behaviour for
   mounting and unmounting partitons in my script, would a command like
   "systemctl stop|start /var/backup" be sufficient?
   And how would a remount command (for read only or read write) look


Michael Hirmke

More information about the systemd-devel mailing list