0

I'm trying to solve the lvmetad startup warning lvmetad startup warning, and in that process I typed the following command:

sudo systemctl status lvm2-lvmetad.service

The output is:

● lvm2-lvmetad.service - LVM2 metadata daemon
   Loaded: loaded (/lib/systemd/system/lvm2-lvmetad.service; disabled; vendor preset: enabled)
   Active: active (running) since lun. 2016-10-24 09:02:16 CEST; 1h 20min ago
     Docs: man:lvmetad(8)
 Main PID: 615 (lvmetad)
    Tasks: 1 (limit: 4915)
   Memory: 2.6M
      CPU: 4ms
   CGroup: /system.slice/lvm2-lvmetad.service
           └─615 /sbin/lvmetad -f

I'm perplexed by the Loaded line: what does mean loaded but disabled (and still active on next line) ?

alci
  • 5,839
  • Did you read man systemctl to see how these terms are used in the official documentation? – Mark Stosberg Oct 24 '16 at 20:38
  • @MarkStosberg yes I did. I also did read https://wiki.ubuntu.com/systemd (deprecated), https://wiki.ubuntu.com/SystemdForUpstartUsers (irrelevant), https://wiki.archlinux.fr/Systemd (better). Globally, systemd is a complex and fast evolving beast, and doc is far from complete. Hence my question. – alci Oct 25 '16 at 12:21

1 Answers1

4
  • Loaded notes whether the service file is loaded into memory. Other possible values besides loaded are masked or error in the case of invalid syntax.
  • disabled and enabled usually relate to whether the service is set to start on boot or not. From man systemctl:

Enabling simply hooks the unit into various suggested places (for example, so that the unit is automatically started on boot or when a particular kind of hardware is plugged in). Starting actually spawns the daemon process (in case of service units), or binds the socket (in case of socket units), and so on.

  • active usually tells you if the service is running or not. Note though that a service can be active but not running due to the RemainAfterExit= directive. "If set to true, the service shall be considered active even when all its processes exited". This directive is documented in man systemd.service.
Behe
  • 113
  • So Loaded / disabled (vendor preset enabled) / active means that somehow, this service is not configured to start on boot (although it should have been with default settings), but is started anyway, by any other mechanism (maybe triggered by a systemd event...). Is that true ? – alci Oct 25 '16 at 16:47
  • 1
    Right, perhaps it was started because another service depended on it being started. You can use systemctl enable lvm2-lvmetad to explicitly enable it. – Mark Stosberg Oct 25 '16 at 19:37