Hi Lennart, >On Fri, 14.10.16 12:06, Michael Hirmke ([email protected]) wrote:
>> 1. How can I prevent systemd from mounting a manually unmounted >> partition? The partiton should be mounted automatically during system >> start, though. >There were some changes related to this in more recent versions of >systemd. Consider upgrading, 210 is pretty ancient. the distribution I use is openSuSE Leap 42.1 which comes with this version of systemd. Installing a newer version would break a lot of things so I tried to avoid this. But Leap 42.2 is on its way and it contains a much newer version of systemd. So I hope they get it finished soon. >That said, if you don't want systemd to mount the thing, consider >removing it from /etc/fstab (or setting "noauto" on the entry there) >and issuing "systemctl daemon-reload". This would mean, that it isn't mounted on system start, which is necessary for this machine. >In never systemd versions you can also take BSD file lock on the >top-level device node in order to block udev from refreshing the >device and generating events for it. That sounds interesting, but I never heard of this feature. Where can I get more information about it? >> 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 >> like? >"systemctl stop /var/backup" is probably not going to suffice. If you >modify your partition table/disk image during runtime this means the >device will vanish from and return to systemd's view as the accesses >are serialized. Whenever the device pops up again systemd might >requeue the jobs declared in /etc/fstab via the "auto" mount option. I tried it and it behaved exactly as you described above. Therefore it was not useful for my purpose. I then added a mask command before my umount and an unmask command after remounting the partition. Dirty, but working solution. >Lennart Thx and bye. Michael. -- Michael Hirmke _______________________________________________ systemd-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/systemd-devel
