You are not logged in.
Hi everyone!
I was looking around my system, that I discovered lvm2.
I searched for it and I found many interesting things about it,
However, I don't use and I don't want later.
I just see it tooks 20s of my startup process in systemd-analyze blame,
I've fixed this by masking its services, but can I remove it completely?
some of applications and tools I use like my deepin desktop and gvfs depends on udisks and libblockdev which depends on lvm2,
that I created this topic for that.
$ pm -Rc lvm2
checking dependencies...
:: evince optionally requires gvfs: bookmark support and session saving
:: ffmpegthumbnailer optionally requires gvfs: support for gio uris
:: inkscape optionally requires gvfs: import clip art
warning: dependency cycle detected:
warning: deepin-session-ui will be removed after its deepin-daemon dependency
warning: dependency cycle detected:
warning: deepin-control-center will be removed after its deepin-daemon dependency
warning: dependency cycle detected:
warning: startdde will be removed after its deepin-daemon dependency
Packages (13) brasero-3.12.2-2 deepin-control-center-4.9.2.1-2 deepin-daemon-3.22.0-1
deepin-dock-4.8.9-2 deepin-draw-1.0.0-2 deepin-launcher-4.6.4-2
deepin-session-ui-4.8.9-1 gnome-disk-utility-3.30.2-1 gvfs-1.38.1+8+ge4eec2bc-1
libblockdev-2.20-1 startdde-3.11.0-2 udisks2-2.8.1-1 lvm2-2.02.183-2
Total Removed Size: 195.78 MiB
:: Do you want to remove these packages? [Y/n] (I know packages are not upgraded and outdated, I plan to upgrade them tomorrow)
is there any safe way to remove lvm2 without hurting the packages listed here?
Last edited by mmdamin (2019-03-08 17:01:48)
Offline
If you are absolutely sure that you're not using it, you can mask the lvm2 service(s).
Offline
If you are absolutely sure that you're not using it, you can mask the lvm2 service(s).
I said in the post that I've masked them, And I'm asking for uninstalling them. Looks impossible.
Offline
Seems libblockdev will have to be rebuilt "--without-lvm"
Offline
I removed lvm2 and several other members of the base group long ago for similar reasons to yours: I don't use all of that stuff. There is a discussion (that I don't really follow) on the mailinglists about substantially reducing the 'base' group to what is really fundamental to a working system as it currently includes all sorts of niche stuff.
However, in this case, you have packages installed that depend on lvm2. Normally, having it installed is pretty harmless as it just sits on disk - this is why I was first surpised about the need to mask the service: even before I removed lvm2, it was never running. So not only do you have a package that depends on the lvm2 package, but you have a service running that requires that the lvm2 service is running.
Perhaps rebuilding tools as Seth suggests will help, but you might be going down quite a rabit hole there. If you want to simplify your system, work from the top down: do you need libblockdev? If so, why? What depends on libblockdev and do you need that? Work your way up the dependency tree and clean up from the top down.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I think it might be possible to uninstall lvm by ignoring dependencies, but I never tried it. libblockdev hard depends on lvm2, but the lvm2 code seems to be in a dynamically loaded module. The same is true for udisks2. You might have to change their configuration to not load the lvm plugins/modules.
/etc/libblockdev/conf.d/00-default.cfg
/etc/udisks2/udisks2.conf
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
lvm2-monitor was changed to be started by sysinit.target with https://git.archlinux.org/svntogit/pack … c6bc534aab
Offline
I removed lvm2 and several other members of the base group long ago for similar reasons to yours: I don't use all of that stuff. There is a discussion (that I don't really follow) on the mailinglists about substantially reducing the 'base' group to what is really fundamental to a working system as it currently includes all sorts of niche stuff.
However, in this case, you have packages installed that depend on lvm2. Normally, having it installed is pretty harmless as it just sits on disk - this is why I was first surpised about the need to mask the service: even before I removed lvm2, it was never running. So not only do you have a package that depends on the lvm2 package, but you have a service running that requires that the lvm2 service is running.
Perhaps rebuilding tools as Seth suggests will help, but you might be going down quite a rabit hole there. If you want to simplify your system, work from the top down: do you need libblockdev? If so, why? What depends on libblockdev and do you need that? Work your way up the dependency tree and clean up from the top down.
You can see output of my pacman that listed packages who depends on lvm, my desktop environment and gnome-disks are listed in it, and I want keep them installed.
Offline
I think it might be possible to uninstall lvm by ignoring dependencies, but I never tried it. libblockdev hard depends on lvm2, but the lvm2 code seems to be in a dynamically loaded module. The same is true for udisks2. You might have to change their configuration to not load the lvm plugins/modules.
/etc/libblockdev/conf.d/00-default.cfg
/etc/udisks2/udisks2.conf
possible with 'pacman -Rd', but is it safe?
Offline
I think it should work, but I can't give you a definitive answer, since I did not try it, and actively use LUKS/LVM2.
Last edited by progandy (2019-03-07 17:01:31)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
... and I want keep them installed.
Then keep their dependencies installed. You can forcibly remove it as noted, but it will come back with the next upgrade unless you block in in your pacman.conf, and still it may give problems.
If you really just want to prevent it from slowing down boot times, you may want to see the active threads on what looks like a bug or config issue with the recent lvm2 package that is resulting in these symptoms.
Last edited by Trilby (2019-03-07 17:04:36)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Block the plugins, see what happens. If no further problems emerge (some client might semi-hard-depend on some plugins) it should be safe enough.
Offline
mmdamin wrote:... and I want keep them installed.
Then keep their dependencies installed. You can forcibly remove it as noted, but it will come back with the next upgrade unless you block in in your pacman.conf, and still it may give problems.
If you really just want to prevent it from slowing down boot times, you may want to see the active threads on what looks like a bug or config issue with the recent lvm2 package that is resulting in these symptoms.
as you said, may I should leaving them installed. I've masked their service and my boot time decreased from 40s to 20s, that was great.
Offline
Block the plugins, see what happens. If no further problems emerge (some client might semi-hard-depend on some plugins) it should be safe enough.
How? which plugins? I didn't undrestand what you've said.
Offline
my boot time decreased from 40s to 20s, that was great.
A 20 second delay is exactly what is described in the currently active issue with kernel 5.0 and lvm2 - so perhaps you'd be best just tracking that issue rather than trying to work around it.
(edit: perhaps I was conflating the two issues in my mind - but a notable and troubling delay is certainly reported)
Last edited by Trilby (2019-03-07 17:17:17)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
mmdamin wrote:my boot time decreased from 40s to 20s, that was great.
A 20 second delay is exactly what is describedin the currently active issue with kernel 5.0 and lvm2 - so perhaps you'd be best just tracking that issue rather than trying to work around it.(edit: perhaps I was conflating the two issues in my mind - but a notable and troubling delay is certainly reported)
$ uname -a
Linux mlz 4.20.10-arch1-1-ARCH #1 SMP PREEMPT Fri Feb 15 17:49:06 UTC 2019 x86_64 GNU/Linux
$ systemd-analyze
Startup finished in 10.168s (firmware) + 167ms (loader) + 8.586s (kernel) + 13.025s (userspace) = 31.948s
graphical.target reached after 10.735s in userspacenote that I said this without 10.168s of firmware,
last time I measured boot time, I didn't use systemd-boot and it didn't measure loading time of firmware.
Offline
seth wrote:Block the plugins, see what happens. If no further problems emerge (some client might semi-hard-depend on some plugins) it should be safe enough.
How? which plugins? I didn't undrestand what you've said.
You even quoted the relevant post by progandy…
Offline
mmdamin wrote:seth wrote:Block the plugins, see what happens. If no further problems emerge (some client might semi-hard-depend on some plugins) it should be safe enough.
How? which plugins? I didn't undrestand what you've said.
You even quoted the relevant post by progandy…
Sorry, I didn't take care what you've qouted and what actually progandy said.
I commented lvm om libblockdev.conf but there's nothing in udisks2.conf:
[udisks2]
modules=*
modules_load_preference=ondemand
[defaults]
encryption=luks1also, pacman -Rd lvm2 doesn't ignore dependencies and still i get error for depending libblockdev on lvm2.
Offline
The top of that file should read
[udisks2]
# Comma separated list of modules to load.
# Use asterisk to load all the modules.on archlinux and also see "pacman -Rh" to understand the options.
Offline
Seems libblockdev will have to be rebuilt "--without-lvm"
I modified the PKGBUILD with the line seth mentioned and removed the deps of both xfsprogs and lvm2 and haven't noticed any ill effects.
Offline
The top of that file should read
[udisks2] # Comma separated list of modules to load. # Use asterisk to load all the modules.on archlinux and also see "pacman -Rh" to understand the options.
If I write -R then press Tab on my zsh, I can see list of possible options, there was -Rd option followed by 'skip dependency check'.
I'll found list of modules then put their names there instead of *.
Offline
-d, --nodeps skip dependency version checks (-dd to skip all checks)Offline
[udisks2]
# Comma separated list of modules to load.
# Use asterisk to load all the modules.
modules=*There doesn't seem to be an option to exclude one module (lvm2) .
man udisks2.conf / udisksd / udisks don't show options to find out which modules are used by udisks2 .
Any idea how to find them ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
https://github.com/storaged-project/udi … ger.c#L340
pacman -Ql udisks2 | sed '/modules.*so/!d; s/^.*_\([^\.]*\)\.so/\1/g'Offline
OT, but a simpler sed:
pacman -Ql udisks2 | sed -n 's/.*_\(.*\)\.so$/\1/p'With the -n flag you don't need to delete lots of lines, just print the ones you want. There is no need for the global 'g' flag as the pattern can't possibly be matched more than once on a line. The start of line anchor is redundant when the pattern starts with a greedy wildcard '.*' and there is no need to exclude literal dots from the module name - there are no modules with dots in the name, but if there ever were, we'd probably want to see those too.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline