| Summary: | fstab-generator impedes mounting to a mountpoint specified in fstab when device specified in it is unplugged. | ||
|---|---|---|---|
| Product: | systemd | Reporter: | bugs.freedesktop.org |
| Component: | general | Assignee: | systemd-bugs |
| Status: | RESOLVED DUPLICATE | QA Contact: | systemd-bugs |
| Severity: | normal | ||
| Priority: | medium | ||
| Version: | unspecified | ||
| Hardware: | x86-64 (AMD64) | ||
| OS: | Linux (All) | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
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.
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.