[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Be careful when editing /etc/fstab



Hi,

I just noticed a new bug report [1]:
"""
Dear Installer Team,

Please consider adding words informing users they should run
"systemctl daemon-reload" after changing /etc/fstab.

With stale mount units from an older /etc/fstab, users might observe
"interesting surprises", f.e. systemd might umount newly mounted
filesystems, if the in-memory mount units conflict with info in
/etc/fstab.
""

Apparently this is old news, I found a systemd bug report [2]
from 2017. It links to documentation [3] that says:
"""
On SysV systems changes to init scripts or any other files that define
the boot process (such as /etc/fstab) usually had an immediate effect
on everything started later. This is different on systemd-based
systems where init script information and other boot-time
configuration files are only reread when "systemctl daemon-reload" is
issued. (Note that some commands, notably "systemctl
enable"/"systemctl disable" do this implicitly however.) This is by
design, and a safety feature, since it ensures that half-completed
changes are not read at the wrong time.
"""

Anyway I was not aware of this so I thought to share it here.
Further information is welcome, if you have any.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=963573
[2] https://github.com/systemd/systemd/issues/7291
[3] https://www.freedesktop.org/wiki/Software/systemd/Incompatibilities/


Reply to: