Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 898964 - sys-kernel/genkernel-4.2.6 lvm requires thin-provisioning-tools causing slow initrd build
Summary: sys-kernel/genkernel-4.2.6 lvm requires thin-provisioning-tools causing slow ...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-03 04:41 UTC by Gil Kloepfer
Modified: 2023-03-08 15:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gil Kloepfer 2023-03-03 04:41:21 UTC
I noticed genkernel taking an extremely long time to generate the initrd, specifically when including lvm support.

Watching the build, it appears this is because lvm is requiring thin-provisioning-tools to be included (see gen_initramfs.sh), even when these are not needed by all LVM installations.  A dependency of thin-provisioning-tools is boost (it is the only package within genkernel depending on boost), and boost (being bloated) is the primary reason why the initrd build is currently taking far longer than a normal build would take if lvm were not selected.

I would like to propose that genkernel support for thin provisioning be made an option of genkernel when including LVM support, as it is with sys-fs/lvm2 (USE=-thin).

Respectfully suggesting as an enhancement, as I realize that this could open the doors for a set of never-ending requests for finer-grained control of genkernel.

Reference also bug#545874, where thin-provisioning-tools support was requested (to be fair).
Comment 1 Gil Kloepfer 2023-03-08 02:49:43 UTC
I'd like to follow-up on this report by lowering its importance somewhat, but also providing some follow-up comments.

I expected my next kernel build's initrd to take forever as it did previously and it didn't, but I couldn't figure out why (in fact, it was very fast).  When I looked into why, I found out that the output of the previous builds of the applications built by genkernel were cached in /var/cache/genkernel.  This is actually an interesting trick.

However, what I do feel would be helpful would be to better document that this is being done.  There's a mention of "--cachedir=" in the genkernel man page, but nothing indicating what this is for (I'm not even sure if this is what that option is for - it literally says "Override the default cache location." as the option's description).

Additionally, on older systems, I discovered several copies of previous versions of genkernel cached compiles sitting in /var/cache, all but the latest of which could probably be removed.  This is probably something that someone using genkernel should know, and even better if an update to genkernel would clean-up automatically.

I like genkernel - it really helps automate the kernel/initrd build process and keeps kernel builds consistent.  That said, I hope that some of what I put in this "bug" report is good, constructive feedback.