[systemd-devel] Failed to restart xxxx.service: "Unit tmp.mount is masked"
沙包妖梦
gongteng524702837 at gmail.com
Sat Sep 28 18:15:19 UTC 2019
Hello, and help, I ran into an issue for several times. I don't know when
and why it happen.
When I want to restart some service, it sais: "Failed to start
xxxxxx.service: Unit xxxx.mount is masked".
xxxx.mount has "RequiresMountsFor" or "PrivateTmp".
When this happens, I will see ALL mountpoint units is masked by "systemctl
status *.mount". (except something like sys-kernel-config.mount)
For example, this time I found my *qbittorrent *is crashed and not auto
restart, so I run "systemctl restart qbittorrent":
> Failed to restart qbittorrent.service: Unit tmp.mount is masked.
>
`systemctl status tmp.mount` shows:
> ● tmp.mount - /tmp
> Loaded: masked (Reason: Unit tmp.mount is masked.)
> Active: active (mounted) since Mon 2019-09-23 00:05:27 CST; 6 days ago
> Where: /tmp
> What: tmpfs
> Tasks: 0 (limit: 4915)
> Memory: 116.0K
> CGroup: /system.slice/tmp.mount
>
Then I found every mount unit "is masked", eg:
> ● data-AppData.mount - /data/AppData
> Loaded: masked (Reason: Unit data-AppData.mount is masked.)
> Active: active (mounted) since Mon 2019-09-23 00:05:37 CST; 6 days ago
> Where: /data/AppData
> What: /dev/mapper/virtual-storage
> Tasks: 0 (limit: 4915)
> Memory: 332.0K
> CGroup: /system.slice/data-AppData.mount
>
I can unmount, remount, r/w. everything seems ok.
I can't restart any service depends on "/data/AppData", like my custom
*homedns-machine.service*, because it has "RequiresMountsFor=/data/AppData"
The service run without problem, but after I stopped it, systemctl refuse
to start.
I can start the service if I comment out "RequiresMountsFor" and reload it.
"systemctl unmask tmp.mount" return 0 with no output. But "systemctl
status" output not change. It still "masked".
Everytime I can only restart my server.
*Anyone know how to fix this?*
systemctl --version
> systemd 241 (v241-12.git1e19bcd.fc30)
> +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP
> +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN
> +PCRE2 default-hierarchy=hybrid
cat /etc/system-release
> Fedora release 30 (Thirty)
uname -a
> Linux server.home.gongt.me 5.2.15-200.fc30.x86_64 #1 SMP Mon Sep 16
> 15:17:36 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20190929/64587a5f/attachment.html>
More information about the systemd-devel
mailing list