View previous topic :: View next topic |
Author |
Message |
Guenther Brunthaler Apprentice
Joined: 22 Jul 2006 Posts: 217 Location: Vienna
|
Posted: Fri Feb 06, 2015 1:04 am Post subject: HOWTO get rid of lvmetad |
|
|
In LVM2, use of lvmetad is optional and can be disabled in lvm.conf.
Unfortunately, /etc/init.d/lvm does not care about whether this setting is enabled or not and starts lvmetad anyway.
If you, like me, hate having running unnecessary daemons, read on how I got rid of that unnecessary critter:
Just create a file /etc/init.d/lvmetad-fake with the following contents:
Code: |
#! /sbin/runscript
depend() {
provide lvmetad
}
start() {
:
}
stop() {
:
}
|
Then make it executable
Code: |
chmod +x /etc/init.d/lvmetad-fake
|
and add it to the boot runlevel:
Code: |
rc-update add lvmetad-fake boot
|
Then the original /etc/init.d/lvm runlevel script will prefer lvmetad-fake over the original lvmetad, and no daemon will be started as the fake script simply does nothing when "started" or "stopped".
WARNING: You must not do this if your lvm.conf actually enabled lvmetad!
Therefore, make sure it is actually disabled:
Code: |
grep use_lvmetad /etc/lvm/lvm.conf
|
must show that the setting use_lvmetad it is actually set to zero.
It might also not be a good idea to disable lvmetad if you have systemd running.
But then, being a genuine Gentoo user, you are unlikely to be a fan of bug-riddled bloatware like systemd anyway. (This is a strictly personal opinion - no claims are made that this is the absolute truth, as it all depends on one's point of view.) |
|
Back to top |
|
|
ulenrich Veteran
Joined: 10 Oct 2010 Posts: 1480
|
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Fri Feb 06, 2015 3:18 am Post subject: |
|
|
Guenther ...
You should be able to do the following and save having fake scripts/services (untested)
/etc/rc.conf
Code: | rc_lvm_provide="lvmetad" |
HTH & best ... khay |
|
Back to top |
|
|
Guenther Brunthaler Apprentice
Joined: 22 Jul 2006 Posts: 217 Location: Vienna
|
Posted: Sun Feb 08, 2015 3:49 am Post subject: |
|
|
Thanks for the hint, but I actually do need the additional LVM.functionality.
I normally use lvm instead of fdisk/gdisk to partition my disks, using logical volumes instead of actual disk partitions.
This has many advantages, for instance live resizing of partitions which are in actual use without prior rebooting. Try to this with real partitions.
But even though I like using lvm that way, I do not need or want lvmetad running all the time just because I use basic LVM2 functionality.
As I see it, lvmetad is only useful in scenarios where the LVM configuration is modified very often, such as when using thin provisioning in combination with short-lived virtual machine instances.
This does not apply to me. |
|
Back to top |
|
|
Guenther Brunthaler Apprentice
Joined: 22 Jul 2006 Posts: 217 Location: Vienna
|
Posted: Sun Feb 08, 2015 4:12 am Post subject: |
|
|
khayyam wrote: |
You should be able to do the following and save having fake scripts/services (untested)
|
Thanks a lot!
Following your advice, I modified rc.conf accordingly and removed my lvmetad-fake service - and lvmetad still did not start!
Now I am really happy, because even installing a fake-service that consumes no further resources still bugs me.
Your suggestion has therefore be tested now and has been proven to work perfectly! |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Sun Jun 07, 2015 1:08 am Post subject: |
|
|
Guenther Brunthaler wrote: | Your suggestion has therefore be tested now and has been proven to work perfectly! |
Excellent.
And great to see you again, after all this time Guenther. :-) |
|
Back to top |
|
|
|