FS#62289 - [lvm2] Please disable lvmetad in lvm2 package
Attached to Project:
Arch Linux
Opened by mkkot (mkkot) - Tuesday, 09 April 2019, 19:15 GMT
Last edited by Christian Hesse (eworm) - Wednesday, 10 February 2021, 10:00 GMT
Opened by mkkot (mkkot) - Tuesday, 09 April 2019, 19:15 GMT
Last edited by Christian Hesse (eworm) - Wednesday, 10 February 2021, 10:00 GMT
|
Details
Description:
Please disable lvmetad, as it's deprecated now: "The lvmetad daemon for caching metadata has been deprecated. In a future major release of Red Hat Enterprise Linux, LVM will always read metadata from disk." https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/7.6_release_notes/chap-red_hat_enterprise_linux-7.6_release_notes-deprecated_functionality_in_rhel7 Currently our package builds with --enable-lvmetad and config file comes with use_lvmetad = 1. I just changed this in wiki documentation here: https://wiki.archlinux.org/index.php/LVM#Shutdown_delay_because_of_lvmetad Why I did this? Because it solves problem with delayed shutdown described here: https://bbs.archlinux.org/viewtopic.php?id=245020 https://bbs.archlinux.org/viewtopic.php?id=244699 |
This task depends upon
Closed by Christian Hesse (eworm)
Wednesday, 10 February 2021, 10:00 GMT
Reason for closing: Implemented
Additional comments about closing: lvm2 2.03.11-3
Wednesday, 10 February 2021, 10:00 GMT
Reason for closing: Implemented
Additional comments about closing: lvm2 2.03.11-3
The term "deprecated" isn't relevant to if there should be a change to this package. It merely means something has been flagged as on its way or is being replaced. Lots of deprecated things can be enabled by default.
What matters if it should be enabled by default. Arch's philosophy is to follow upstream. If we look to RHEL, although their documentation says it's deprecated, it is still in use until "a future major release of [RHEL]." If we look to Fedora's lvm2-2.02.184-1.fc31.src, lvmetad is enabled by default in its lvm2.spec. So, neither of Red Hat's distributions have disabled it.
lvm2 has for a very long time caused slow boot and shutdown in some situations for Arch users. This isn't some catastrophic situation that justifies deviating from upstream any more than it has in the past.
Fedora's most recent srpm also builds with "--enable-lvmetad". And, its config file comes with "use_lvmetad = 1". Arch's "/etc/lvm/lvm.conf" comes from upstream, and is not Arch specific.
There's an upstream bugreport about slowing down boot and shutdown on linux 5 here: https://github.com/lvmteam/lvm2/issues/14 --- they're aware of it, but have not chosen to issue a new stable release disabling or removing lvmetad.
Upstream has a commit totally removing lvmetad, but they haven't released that or a configuration file that defaults it to off in their stable branch. It's only in their developmental 2.03 branch. See: https://github.com/lvmteam/lvm2/commit/117160b27e510dceb1ed6acf995115c040acd88d --- And note that although this commit is from last July, for whatever reason, they haven't submitted it to their stable branch. Who knows what other commits are in their unstable branch that they would say should go along with disabling lvmetad.
The default needs to be to keep it as provided by upstream, and let users manually disable it if they wish, until lvm2 makes the change in their stable branch.
That does not mean it should not be considered for removal or be disabled by default on performance grounds.
Any such change would obviously need to be extensively tested for data integrity issues.
etc/lvm/lvm.conf is generated from example.conf.in which contains use_lvmetad = @DEFAULT_USE_LVMETAD@
If you build with --disable-use-lvmetad then it will contain "use_lvmetad = 0"
https://github.com/lvmteam/lvm2/commit/117160b27e510dceb1ed6acf995115c040acd88d removes --enable-lvmetad why is that commit or other commits needed for --disable-use-lvmetad or --disable-lvmetad ?
Without lvmetad the mkinitcpio hooks would need to be changed I do not believe mkknot was suggesting otherwise.
Unless upstream reverses its intention to remove support for lvmetad such a change can be deferred until it is removed from stable.
@HyperBaton only tangentially.