<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - fstab-generator impedes mounting to a mountpoint specified in fstab when device specified in it in unplugged."
href="https://bugs.freedesktop.org/show_bug.cgi?id=89768">89768</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>fstab-generator impedes mounting to a mountpoint specified in fstab when device specified in it in unplugged.
</td>
</tr>
<tr>
<th>Product</th>
<td>systemd
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Assignee</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>bugs.freedesktop.org@mailinator.net
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>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: <a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a>
--
-- 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: <a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a>
--
-- 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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>