Hello, from time to time i am having the next issue when restarting the services: systemctl restart apache2.service php-fpm.service Failed to restart apache2.service: Unit var.mount is masked. Failed to restart php-fpm.service: Unit tmp.mount is masked. now the status of masked services systemctl status var.mount tmp.mount ● var.mount - /var Loaded: loaded (file is masked) Active: active (mounted) since Fri 2021-05-07 10:03:52 -05; 28min ago Where: /var What: /dev/mapper/system-root Docs: man:fstab(5) man:systemd-fstab-generator(8) Tasks: 0 (limit: 4915) CPU: 1ms CGroup: /system.slice/var.mount May 07 10:03:52 localhost systemd[1]: Mounting /var... May 07 10:03:52 localhost systemd[1]: Mounted /var. ● tmp.mount - Temporary Directory (/tmp) Loaded: loaded (file is masked) Active: active (mounted) since Fri 2021-05-07 10:03:52 -05; 28min ago Where: /tmp What: tmpfs Docs: https://systemd.io/TEMPORARY_DIRECTORIES man:file-hierarchy(7) https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems Tasks: 0 (limit: 4915) CPU: 4ms CGroup: /system.slice/tmp.mount this is the fstab: /dev/system/root / btrfs defaults 0 0 /dev/system/root /.snapshots btrfs subvol=/@/.snapshots 0 0 /dev/system/root /var btrfs subvol=/@/var 0 0 /dev/system/root /usr/local btrfs subvol=/@/usr/local 0 0 /dev/system/root /srv btrfs subvol=/@/srv 0 0 /dev/system/root /root btrfs subvol=/@/root 0 0 /dev/system/root /opt btrfs subvol=/@/opt 0 0 /dev/system/root /home btrfs subvol=/@/home 0 0 /dev/system/root /boot/grub2/x86_64-efi btrfs subvol=/@/boot/grub2/x86_64-efi 0 0 /dev/system/root /boot/grub2/i386-pc btrfs subvol=/@/boot/grub2/i386-pc 0 0 UUID=3510-7E2E /boot/efi vfat utf8 0 2 /dev/system/noe /opt/noe btrfs defaults 0 0 /dev/system/root /snap btrfs subvol=@/snap 0 0 /dev/system/kriss /opt/kriss btrfs defaults the only solution i found is restarting the whole server
systemctl status var.mount tmp.mount ● var.mount - /var Loaded: masked (Reason: Unit var.mount is masked.) Active: active (mounted) (Result: exit-code) since Fri 2021-05-07 10:03:52 -05; 28min ago Where: /var What: /dev/mapper/system-root Tasks: 0 (limit: 4915) CGroup: /system.slice/var.mount May 07 10:03:52 localhost systemd[1]: Mounting /var... May 07 10:03:52 localhost systemd[1]: Mounted /var. ● tmp.mount - Temporary Directory (/tmp) masked (Reason: Unit tmp.mount is masked.) Active: active (mounted) (Result: exit-code) since Fri 2021-05-07 10:03:52 -05; 28min ago Where: /tmp What: tmpfs Tasks: 0 (limit: 4915) CGroup: /system.slice/tmp.mount
On 2021/05/07 08:34, Walddys Emmanuel Dorrejo Céspedes wrote:
Hello, from time to time i am having the next issue when restarting the services:
systemctl restart apache2.service php-fpm.service Failed to restart apache2.service: Unit var.mount is masked. Failed to restart php-fpm.service: Unit tmp.mount is masked.
now the status of masked services
systemctl status var.mount tmp.mount ● var.mount - /var Loaded: loaded (file is masked) Active: active (mounted) since Fri 2021-05-07 10:03:52 -05; 28min ago
May 07 10:03:52 localhost systemd[1]: Mounting /var... May 07 10:03:52 localhost systemd[1]: Mounted /var.
● tmp.mount - Temporary Directory (/tmp) Loaded: loaded (file is masked) Active: active (mounted) since Fri 2021-05-07 10:03:52 -05; 28min ago
this is the fstab: /dev/system/root / btrfs defaults 0 0 /dev/system/root /var btrfs subvol=/@/var 0 0
the only solution i found is restarting the whole server
--- Well, systemd is very much like Windows svchost, though I'd consider that a bug as well. I thought 'masked' simply meant that the service was under systemd's control. Even though systemd claims var+tmp are mounted, have you tried doing a restart on those services? What I'm wondering is if the squid service is trying something other than "systemctl" to restart var and tmp, since I've only seen the "masked" message when trying to restart some service via a SV5 script -- which usually means systemd has claimed responsibility for managing that service. What you might try looking in /usr/lib/systemd (?my systemd paths may not be current but...), I found the 'tmp.mount' service in there. Maybe try renaming that to tmp.mount- temporarily just to see if it makes a difference in the message. Oddly, systemd looks like it may regard services under some control other than systemd, as 'masked' as well, but that's not real clear. I take it you've reset both tmp.mount and var.mount manually and get no masked message? (if something I say about systemd sounds wrong, it probably is -- I'm not a systemd expert, to say the least). -linda
On Sunday 09 May 2021, L A Walsh wrote:
....
I thought 'masked' simply meant that the service was under systemd's control.
...
Under systemd masked is the the highest level of disablement, a masked unit cannot be started automatically or manually. So if I mask nmb, it won't be started at boot, it won't be started after boot even if some unit is started that "Wants" it, and I won't be able to manually start it with systemctl start nmb. I believe systemd may automagically mask some units - for example, if there is an error in a specification (but I'm getting out of my depth here). It may be that in the OP case, the units have been masked for a reason. In contrast to masked, disabled is one level lower. A disabled unit may be started automatically if something Wants it, and it can be started manually. For example I have disabled nmb, smb, and spamd, and I have a timer that goes off after boot that Wants nmb, smb and spamd. The deferal to after boot speeds up boot to sddm login by 6 seconds (I was curious as to how much I could speed up booting). Michael
Hello Linda, I tried restart the service, but can't be clean the state of masked, the only solution was restart the server itself. tried unmask, restart, stop and start. but never happened on my main to change the name of the file, when it happen again i will try that solution. thanks.
participants (3)
-
L A Walsh
-
Michael Hamilton
-
Walddys Emmanuel Dorrejo Céspedes