Bug 85751

Summary: systemd mounts automatically after umount or systemctl disable/stop
Product: systemd Reporter: flo
Component: generalAssignee: systemd-bugs
Status: RESOLVED NOTABUG QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description flo 2014-11-02 09:55:06 UTC
On opensuse 13.1 (systemd 208), following occurs:

# grep temp /etc/fstab
/dev/system/oldssd   /localhome/flo/temp        ext4    acl,user_xattr 1 2

# umount /localhome/flo/temp

# systemctl -a |grep /localhome/flo/temp
localhome-flo-temp.mount   loaded inactive dead      /localhome/flo/temp

# lvchange -an /dev/system/oldssd 
# lvchange -ay /dev/system/oldssd

# mount |grep /localhome/flo/temp
/dev/mapper/system-oldssd on /localhome/flo/temp type ext4 (rw,relatime,data=ordered)

# systemctl -a |grep /localhome/flo/temp
localhome-flo-temp.mount  loaded active   mounted   /localhome/flo/temp

This also happens, when i stop and disable localhome-flo-temp.mount
I can only reliable umount the filesystem by commenting out the fstab entry or by systemctl mask localhome-flo-temp.mount after umount.

I could not find a sign in the docs if this behavior is wanted or if it is a bug. Unfortunately i could not test newer systemd versions. But bug 81361 is very similar.
I think systemctl disable should output a message, that this is unsupported/useless for generated units.
Comment 1 Lennart Poettering 2015-02-04 17:02:00 UTC
The fstab entry does not contain "noauto", which means "auto" behaviour is implied. "auto" means that the device is mounted when it appears and that we'll wait for it at boot.

The LVM commands you issue probably result in the block devices to be removed and then hotplugged again, thus triggering the mount again.

Please add "noauto" to your fstab lines if you don't want those file systems mounted automatically.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.