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:
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:
myeconfargs+=( --with-thin=$(usex thin internal none)
--with-cache=$(usex lvm internal none) )
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 :(
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:
sys-fs/lvm2: disable LVM and thin by default
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.