You are not logged in.

#1 2020-10-23 18:26:41

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Why are LVM services/units starting by default when I don't need them?

Hi,

I recently used systemd-analyse plot to see my boot "diagram" and I noticed that there are several "lvm" units which are being loaded by default, I never used LVM on my computer.

According to pacman, the lvm2 package was installed as a (deep) dependency for Gnome Disks which I use occasionally. I am okay with it being installed, but how do I disable it from automatically starting? Usually services in Arch are disabled until they are explicitly enabled by the user. I tried to disable them manually (both the .service and .socket units) but they are still starting for some reason hmm

What should I do to disable them? And optionally, can I remove the lvm2 package and substitute with some dummy package or something like that?

Offline

#2 2020-10-23 19:03:50

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Why are LVM services/units starting by default when I don't need them?

"systemctl mask foo.service foo.socket" to prevent them from ever being activated for any reason.

Note the package is one of the rare ones activated in the package, which provides:

/usr/lib/systemd/system/sysinit.target.wants/lvm2-lvmetad.socket
/usr/lib/systemd/system/sysinit.target.wants/lvm2-lvmpolld.socket
/usr/lib/systemd/system/sysinit.target.wants/lvm2-monitor.service

I presume the idea is bad things can happen if core system infra for mounting disks simply fails.

I have these masked too...


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2020-10-23 19:12:57

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: Why are LVM services/units starting by default when I don't need them?

Thanks for the hint! I have masked those default units and hopefully they won't start in the next boot smile

Note the package is one of the rare ones activated in the package, which provides:

Yes, I did notice that, and found it very strange smile

Maybe we should open a ticket to change this behavior? This goes against what Arch usually does, and stands for... i.e total user control of their software.

Offline

#4 2020-10-23 20:47:57

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,556
Website

Re: Why are LVM services/units starting by default when I don't need them?

I can't find references at the moment, but I do know this has come up a couple times before.  While I'd personally completely agree with you, when it previously came up it seemed that the relevant dev(s) were not convinced.  It's not any sort of oversight, it was a deliberate and considered choice - so simply opening a ticket to ask the dev(s) to reconsider may not be productive if there is no new information or relevant changes to the package / services in the intervening time.

Last edited by Trilby (2020-10-23 20:48:19)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2020-10-23 20:51:25

loqs
Member
Registered: 2014-03-06
Posts: 17,436

Re: Why are LVM services/units starting by default when I don't need them?

Offline

#6 2020-10-23 22:19:24

TheDcoder
Member
Registered: 2020-06-06
Posts: 116
Website

Re: Why are LVM services/units starting by default when I don't need them?

You are right Trilby, since they have already made a decision, a new ticket with nothing new wouldn't be very productive... Thanks to loqs for mentioning the ticket. Good to know that it was deliberate and not some old mistake left-out for backwards compatibility!

Offline

Board footer

Powered by FluxBB