Are lvm2-* services necessary on my system

Hello everyone,

Hope you are enjoying the sweet weekend :slight_smile:

Please help me understand the lvm2-* services in my openSUSE Tumbleweed system. These services are lvm2-monitor.service, lvm2-lvmetad.service and lvm2-lvmetad.socket that are shown in the following systemd-analyze critical-chain results list, @3.786s
└─ @3.785s
  └─cron.service @3.785s
    └─postfix.service @2.331s +1.452s
      └─ @2.330s
        └─wpa_supplicant.service @3.165s +27ms
          └─dbus.service @1.344s
            └─ @1.331s
              └─ @1.277s
                └─iscsid.socket @1.277s
                  └─ @1.276s
                    └─systemd-update-utmp.service @1.265s +11ms
                      └─auditd.service @1.211s +53ms
                        └─systemd-tmpfiles-setup.service @1.195s +13ms
                          └─ @1.195s
                            └─opt.mount @690ms +497ms
                              └─ @655ms
                                └─lvm2-monitor.service @215ms +439ms
                                  └─lvm2-lvmetad.service @231ms
                                    └─lvm2-lvmetad.socket @208ms

But I am not sure my system has anything related to lvm2. This lvm2 must be “logical volume management”. It is only necessary when the system uses logical volume as filesystem (or something like that?). Am I right?

Then, here is my disk information,

cnzhx:~> sudo df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs         12G     0   12G   0% /dev
tmpfs            12G   81M   12G   1% /dev/shm
tmpfs            12G  2.0M   12G   1% /run
tmpfs            12G     0   12G   0% /sys/fs/cgroup
/dev/nvme0n1p6   41G   11G   29G  27% /
tmpfs           5.9G   56K  5.9G   1% /tmp
/dev/nvme0n1p6   41G   11G   29G  27% /var/crash
/dev/nvme0n1p1  256M   29M  228M  12% /boot/efi
/dev/nvme0n1p6   41G   11G   29G  27% /.snapshots
/dev/nvme0n1p8  236G  123G  102G  55% /data
/dev/nvme0n1p7   59G   15G   42G  27% /home
/dev/nvme0n1p6   41G   11G   29G  27% /var/cache
tmpfs            12G  7.7M   12G   1% /home/zramdisk
/dev/nvme0n1p6   41G   11G   29G  27% /usr/local
/dev/nvme0n1p6   41G   11G   29G  27% /boot/grub2/x86_64-efi
/dev/nvme0n1p6   41G   11G   29G  27% /var/log
/dev/nvme0n1p6   41G   11G   29G  27% /var/lib/machines
/dev/nvme0n1p4   41G  140M   40G   1% /home/wind
/dev/nvme0n1p6   41G   11G   29G  27% /var/opt
/dev/nvme0n1p6   41G   11G   29G  27% /var/lib/mysql
/dev/nvme0n1p6   41G   11G   29G  27% /srv
/dev/nvme0n1p6   41G   11G   29G  27% /var/lib/mariadb
/dev/nvme0n1p6   41G   11G   29G  27% /var/lib/mailman
/dev/nvme0n1p6   41G   11G   29G  27% /boot/grub2/i386-pc
/dev/nvme0n1p6   41G   11G   29G  27% /var/lib/named
/dev/nvme0n1p6   41G   11G   29G  27% /var/lib/pgsql
/dev/nvme0n1p6   41G   11G   29G  27% /var/spool
/dev/nvme0n1p6   41G   11G   29G  27% /var/tmp
/dev/nvme0n1p6   41G   11G   29G  27% /var/lib/libvirt/images
/dev/nvme0n1p6   41G   11G   29G  27% /opt
tmpfs           2.4G   16K  2.4G   1% /run/user/1000

At last, can I disable these three services safely? Although I already read the post on ArchLinux saying the user wanted to disable these services and she/he did it already without problem. But I wanted to be absolutely sure about this operation.

If I recall correctly, my system did not have these services before. They might be pulled in in recent upgrades of TW, maybe after snapshot 20180120.

Thanks in advance.


I’m running TW with those services disabled.

lvm2-monitor.service is described in YaST as being concerned with Btrfs snapshots, which you appear to be using.

Thank you Paul. Have you intentionally disabled these services/socket? I have not enabled these by myself. So I am wondering whether they are enabled after recent upgrades.

Thank you eng-int. I didn’t notice this. But I really could not understand the relationship between BtrFS snapshot and LVM2.

I just tried

  systemctl status lvm2-monitor

on a few Leap systems. Those with BtrFS it was enabled, and on those without BtrFS it was disabled.

Hi eng-int, thank you for your confirmation. You have such a big collection. Then I guess I need to keep them running at the moment when they are needed by Leap.

Ah… OK… No BtrFS on my systems, all ext4. So, yes, keep them enabled. Sorry for the potentially misleading information.

Hi, Paul, your information is appreciated as well. And thanks for your further notice. It adds to my evidence pool.

Just a quick note. These services do not present in the boot sequence at least since snapshot 20180320. I don’t know exactly time because I was not tracking this closely.