Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 198534 - Better /etc/lvm/lvm.conf than the unmodified original one.
Summary: Better /etc/lvm/lvm.conf than the unmodified original one.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-09 07:15 UTC by Robin Johnson
Modified: 2008-01-25 19:22 UTC (History)
0 users

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


Attachments
lvm.conf (lvm.conf,1.60 KB, text/plain)
2007-11-09 07:16 UTC, Robin Johnson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-11-09 07:15:52 UTC
This is mainly for the release media, but is also relevant to the initramfs that is built by genkernel.

In the stock one on the livecd, you get spews of errors due to the /dev/nbd* devices existing but not being readable, as below, every time you run one of the LVM tools.
====
nbd0: Attempted send on closed socket
end_request: I/O error, dev nbd0, sector 0
...
nbd15: Attempted send on closed socket
end_request: I/O error, dev nbd15, sector 0
====

I've attached an lvm.conf that runs a bit cleaner, with sane defaults for both new installs and reading old disks.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-11-09 07:16:19 UTC
Created attachment 135547 [details]
lvm.conf
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2007-11-13 22:47:31 UTC
Wouldn't it be better to get the ebuild/upstream to accept this file?  I don't want to have to keep a completely separate config file that can easily be broken in future lvm versions.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-11-14 01:12:24 UTC
If I make the ebuild install it as /etc/lvm/lvm.conf.minimal, would you pick it up from there on the user's system?
Comment 4 Chris Gianelloni (RETIRED) gentoo-dev 2007-11-16 00:56:01 UTC
I'd really prefer not to do anything of the sort.  I am working towards the removal of any code which requires files from the user's system which are not provided by genkernel.  I especially don't want to add one-offs that will only have to be removed later.

Is there a reason it cannot be a sensible default for the package?

Would that exact same reason not make it unsuitable for being a sensible default for genkernel?

We pull the user's /etc/lvm/lvm.conf for a reason.  We want what the user has configured.  In the case of a "genkernel --lvm all" without configuration, it should be a usable default configuration.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-11-16 01:09:10 UTC
99% of users do not touch their lvm.conf, so I'll just make the changes there instead, since you say you'll take the lvm.conf from them.

There are two key changes: 
- ignore nbd devices by default, because of the kernel noise.
- explicitly use the LVM2 format when creating new PV/VG/LV entities. (this is esp. important in the livecd env, when they create their systems).
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-11-16 08:11:29 UTC
I implemented it in lvm2-2.02.28-r3 now.
It provides the slightly changed lvm.conf as the new default (the changes described in comment 5).
If genkernel could pull in this new revision, that would be ideal.

For genkernel-3.5.0, it should also pick /sbin/lvm.static rather than /sbin/lvm  - not sure how best to put that into the dependancy tree. Maybe a block against older genkernel versions?
Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2007-11-16 17:55:29 UTC
We don't pull ebuilds for genkernel.  Everything provided by genkernel is provided by upstream tarballs or our own tarballs.  If I need to pull the config, I can do that.  Is it being submitted upstream?  Like I said, I don't want to end up maintaining something outside of the main upstream tarball, if I can help it.  We can do it for the short term, but I definitely won't let it carry over into genkernel 3.5's codebase.  I'm also not going to be pulling *any* LVM binary from the running system in 3.5, but instead will be compiling it on-demand.

My goal is pretty simple.  I think that genkernel (via ebuild) should provide everything that it needs.  If we need device-mapper, we grab the tarball and compile it.  That is where I want to be.  For files such as configuration files, I'd like the default to pull from the system, but capable of being overridden from genkernel.conf, so people can create a custom config just for their initramfs/livecd/whatever.  With 3.5, it won't care so much what's on the live system, except in cases where they need to be somewhat in sync.
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-11-16 22:58:53 UTC
By pull ebuilds, I mean that if genkernel is being used with LVM, the user should ideally have a specific revision or newer of LVM on their system, so that the best possible lvm.conf is used.
Eg: If LVM, DEPEND on lvm2-2.02.28-r3, and use that /etc/lvm/lvm.conf (esp when you are rolling the release media, but be sure you get the profiles/base/package.use entries with it).

The config changes are specifically better defaults for Gentoo. Both RH and Debian ship their LVM configs in separate packages from the LVM binaries, and have them even more heavily customized than we do. Upstream in this case won't take config specialization patches, they say to ship it with the distro packaging.
Comment 9 Chris Gianelloni (RETIRED) gentoo-dev 2007-11-28 23:06:37 UTC
Well, genkernel will pull the current stable.  I've gone and marked -r3 stable in the snapshot.  We'll likely want to do the same in the tree.

Since the newer lvm ebuilds have this as default, so does genkernel, since we pull lvm.conf from the live system.
Comment 10 Chris Gianelloni (RETIRED) gentoo-dev 2008-01-24 09:35:29 UTC
So, RESOLVED-FIXED?
Comment 11 Chris Gianelloni (RETIRED) gentoo-dev 2008-01-25 19:22:51 UTC
Let's say yes...