After upgrading from sys-fs/lvm2-2.03.17-r1 to sys-fs/lvm2-2.03.17-r2 % qlist -IUv lvm2 sys-fs/lvm2-2.03.17-r2 lvm -lvm2create-initrd readline -sanlock -selinux -static -static-libs -systemd -thin -udev all lvm tools are broken like this: # lvs WARNING: Unrecognised segment type cache WARNING: Unrecognised segment type cache-pool LV sysvm/root_cache, segment 1 invalid: sets METADATA_FORMAT flag for cache-pool segment. Internal error: LV segments corrupted in root_cache. Cannot process volume group sysvm LV data/gentoo-rsync_cache, segment 1 invalid: sets METADATA_FORMAT flag for cache-pool segment. Internal error: LV segments corrupted in gentoo-rsync_cache. Cannot process volume group data Reason for this is that the ebuild forces --with-cache=none when not USE="lvm thin". I may not understand this why, but as far as I know I don't want thin volumes support, but do want cache support. I've updated the ebuild's else case like so: else myeconfargs+=( --with-thin=$(usex thin internal none) --with-cache=$(usex lvm internal none) ) fi After recompiling this way, all lvm tools work again properly. I'm not sure if cache and thin handling need to be pulled apart more, or if my suggested patch would be sufficient. It would allow thin without lvm (cache), but it somehow doesn't feel sensical that cache is connected to lvm here. Anyway, please allow cache support to be enabled without thin volume support.
Can this please be looked at? This just broke a system after the latest lvm2 update :(
grobian: The cache_* binaries are part of sys-block/thin-provisioning-tools; Are you SURE you were using lvm2-2.03.17-r1.ebuild? I checked the history of that version, and the cache support is only there is you have USE=thin. If you're saying that Thin & Cache work reliably without sys-block/thin-provisioning-tools being present, then let's change that everywhere, but it really surprises me.
Yes I was running 2.03.17-r1, but this happened inbetween -r1 and -r2: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e31bcf83eb070afb477f68cf9e22387a3f95e592 sys-fs/lvm2: disable LVM and thin by default See https://www.gentoo.org/support/news-items/2022-11-19-lvm2-default-USE-flags.html. That triggered me to only enable USE=lvm, for I don't use thin-provisioning and it has the heavy deps via thin-provisioning-tools. % qlist -Iv thin-provisioning-tools % I use SSD-cached volumes with HDDs, see lvmcache(7). Without the cache module, lvm fails in many ways because it doesn't understand the cached volumes any more, claiming corruption etc, see first post. I don't know how much this bloats the lvm binary, but in fact I don't think there's a real use-case why one wouldn't want cache=internal. You don't need cache_* binaries, it's all in lvm AFAICT.