[systemd-devel] Again, why this strange behavior implied by "auto" in fstab ?

Mike Gilbert floppym at gentoo.org
Tue Jan 23 19:09:16 UTC 2018


On Tue, Jan 23, 2018 at 10:54 AM, Reindl Harald <h.reindl at thelounge.net> wrote:
>
>
> Am 23.01.2018 um 16:49 schrieb Simon McVittie:
>>
>> On Tue, 23 Jan 2018 at 15:47:21 +0100, Franck Bui wrote:
>>>
>>> Basically, systemd mounts all filesystems listed in /etc/fstab (unless
>>> "noauto" is used) which is good since that's how fstab was used when
>>> SysV was the init system.
>>>
>>> However it also introduced another "feature" which basically
>>> automagically mounts a filesystem (listed in fstab) every time its
>>> backend device re-appears.
>>
>>
>> Am I right in thinking this is only done if the filesystem is not declared
>> as noauto in fstab?
>
>
> with Fedora 27 (yesterday upgraded) systemd even don't leave "noauto"
> mount-point in peace and spits the "Failed to read symlink target for
> /mnt/arrakis: Permission denied" for fuse-mountpoints multiple times each
> day into the systemlogs (systemd-234-9.fc27.x86_64)
>
> [root at srv-rhsoft:~]$ systemctl daemon-reload
>
> [root at srv-rhsoft:~]$ cat messages
> Jan 23 16:52:16 srv-rhsoft systemd-fstab-generator[27644]: Failed to read
> symlink target for /mnt/arrakis: Permission denied
>
> [root at srv-rhsoft:~]$ cat /etc/fstab | grep /mnt/arrakis
> sshfs#reindl at arrakis:/ /mnt/arrakis                       fuse
> noauto,user,rw,noexec,nosuid,nodev,noatime,uid=harry

Sounds like you have a broken symlink at /mnt or /mnt/arrakis. systemd
is trying to deference said symlink when it generates the mount unit
for that fstab entry.

There's an explanation for this in the commit that introduced the behavior.

https://github.com/systemd/systemd/commit/634735b56b82bdde3c67193ba7b470bab80fdcbd


More information about the systemd-devel mailing list