Bug 89768 - fstab-generator impedes mounting to a mountpoint specified in fstab when device specified in it is unplugged.
Summary: fstab-generator impedes mounting to a mountpoint specified in fstab when devi...
Status: RESOLVED DUPLICATE of bug 89383
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-25 20:05 UTC by bugs.freedesktop.org
Modified: 2015-05-15 14:46 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description bugs.freedesktop.org 2015-03-25 20:05:57 UTC
Hi,

my /etc/fstab contains:
UUID=XXXX  /mnt ntfs noauto 0 0

systemd-fstab-generator thus creates a mnt.mount service :
● mnt.mount - /mnt                             
   Loaded: loaded (/etc/fstab)
   Active: inactive (dead)
    Where: /mnt
     What: /dev/disk/by-uuid/XXXX
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)

Issue is : Trying to mount (any other device) to this mountpoint when the device UUID=XXXX is not plugged in, seems to succeed (mount returns 0, dmesg), but doesn't.

Output of journalctl -xe with the UUID=XXXX device plugged out : 

Mar 25 20:18:39 Host sudo[23295]: user : TTY=pts/2 ; PWD=/home/user ; USER=root ; COMMAND=/usr/bin/mount /dev/sda1 /mnt
Mar 25 20:18:39 Host sudo[23295]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 25 20:18:39 Host kernel: EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
Mar 25 20:18:39 Host systemd[1]: Unit mnt.mount is bound to inactive service. Stopping, too.
Mar 25 20:18:39 Host systemd[1]: Unmounting /mnt...
-- Subject: Unit mnt.mount has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mnt.mount has begun shutting down.
Mar 25 20:18:39 Host sudo[23295]: pam_unix(sudo:session): session closed for user root
Mar 25 20:18:39 Host systemd[1]: Unmounted /mnt.
-- Subject: Unit mnt.mount has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mnt.mount has finished shutting down.

Here it is when plugged in : 
Mar 25 20:41:28 Host sudo[562]: user : TTY=pts/1 ; PWD=/home/user ; USER=root ; COMMAND=/usr/bin/mount /dev/sda1 /mnt
Mar 25 20:41:28 Host sudo[562]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 25 20:41:28 Host sudo[562]: pam_unix(sudo:session): session closed for user root
Mar 25 20:41:28 Host kernel: EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[Device successfully mounted on /mnt]

This is even more an issue as mount(8) stipulates that "The  mount program does not read the /etc/fstab file if both device (or LABEL, UUID, PARTUUID or PARTLABEL) and dir are specified." (i.e. people don't expect fstab to mess with a command like "mount /dev/sda1 /media").

Thank you for reading.
Comment 1 Lennart Poettering 2015-05-15 14:46:18 UTC
Appears to be a duplicate of 89383, closing.

*** This bug has been marked as a duplicate of bug 89383 ***


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.