Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 287650 - updated ebuild/patches for lvm 2.02.53
Summary: updated ebuild/patches for lvm 2.02.53
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-04 17:30 UTC by Matthias Dahl
Modified: 2010-03-06 16:52 UTC (History)
5 users (show)

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


Attachments
ebuild diff: 2.02.51-r1 -> 2.02.53 (2.02.53.ebuild.diff,1.24 KB, patch)
2009-10-04 17:36 UTC, Matthias Dahl
Details | Diff
updated as-needed patch (lvm2-2.02.53-as-needed.patch,6.12 KB, patch)
2009-10-04 17:38 UTC, Matthias Dahl
Details | Diff
updated lvm.conf patch (lvm.conf-2.02.53.patch,1.79 KB, patch)
2009-10-04 17:38 UTC, Matthias Dahl
Details | Diff
updated selinux/pkgconfig patch (lvm2-2.02.53-fix-pkgconfig.patch,1.52 KB, patch)
2009-10-04 17:40 UTC, Matthias Dahl
Details | Diff
ebuild diff: 2.02.51-r1 -> 2.02.53 (2.02.53.ebuild.diff,1.31 KB, patch)
2009-10-05 12:28 UTC, Matthias Dahl
Details | Diff
updated device mapper export format patch (lvm2-2.02.53-device-mapper-export-format.patch,10.99 KB, patch)
2009-10-05 12:34 UTC, Matthias Dahl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Dahl 2009-10-04 17:30:51 UTC
LVM 2.02.53 has been released on Sep 26th. Updated patches are attached as well as a patch for the ebuild. I have tested everything on two different machines and things worked smoothly. In contrast to 2.02.51 which had its own share of problems (see below) like dmeventd crashing on me from time to time while handling snapshots.

Please note: I have changed the udev rules handling. With the current version in portage (2.02.51), there is a race condition between udev and lvm which is easily reproducible: Create a snapshot of a logical volume and try to delete it again. Usually 7 out of 10 tries will fail to delete the snapshot wrongfully reporting that the device is currently in use/open. This is directly related to the installed udev rule. So the ebuild is now changed to install the LVM supplied udev rules which work without any problems for me on my private system and on a company server I administrate. Please consider this change.

If there is anything else, please let me know.

Reproducible: Always
Comment 1 Matthias Dahl 2009-10-04 17:36:11 UTC
Created attachment 206004 [details, diff]
ebuild diff: 2.02.51-r1 -> 2.02.53

- adds installation of LVM udev rules
- removes pvcreate patch (no longer necessary)
- removes Gentoo specific device mapper export patch which is no longer required because the LVM supplied udev rules are installed
Comment 2 Matthias Dahl 2009-10-04 17:38:04 UTC
Created attachment 206006 [details, diff]
updated as-needed patch
Comment 3 Matthias Dahl 2009-10-04 17:38:59 UTC
Created attachment 206008 [details, diff]
updated lvm.conf patch
Comment 4 Matthias Dahl 2009-10-04 17:40:15 UTC
Created attachment 206011 [details, diff]
updated selinux/pkgconfig patch
Comment 5 Matthias Dahl 2009-10-04 17:47:17 UTC
If I may ask, have those patches been pushed upstream yet? IMHO they are the
right thing to do (TM) so upstream would profit from it and maintaining the ebuild would get a bit less time-consuming.
Comment 6 Alasdair Kergon 2009-10-05 10:42:36 UTC
Well I did some build fixes last week so you building in a different directory from the source should work now.  I'll check through these patches to see if there's anything else we can take.  As for 'lvm1' being the default format, that certainly needs changing upstream now!
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-10-05 11:04:11 UTC
We DO need the device-mapper-export-format.patch. It's not only used by the udev rules. It's popular with the dmcrypt users as well. Please add it back (and it's one of the patches I'd asked agk to include before, but never heard back on).
Comment 8 Matthias Dahl 2009-10-05 11:44:36 UTC
I'll have a look at the export patch later today or tomorrow. Nevertheless, I still strongly believe "we" should nevertheless use the LVM supplied udev rules. They work fine and if there are any issues, those can be fixed and pushed upstream as well.
Comment 9 Matthias Dahl 2009-10-05 12:28:54 UTC
Created attachment 206076 [details, diff]
ebuild diff: 2.02.51-r1 -> 2.02.53

+ included device mapper export patch again
+ used today's portage ebuild (keywords changed)
Comment 10 Matthias Dahl 2009-10-05 12:34:34 UTC
Created attachment 206077 [details, diff]
updated device mapper export format patch

+ identical to the original patch, just re-diffed against 2.02.53 w/ minor modification
+ tested and works like 2.02.51 w/ patch
Comment 11 Alasdair Kergon 2009-10-05 12:46:58 UTC
So - the default has been "lvm2" format for a long time.  It's the text in example.conf that was wrong and I've now corrected.  I've merged the libdevmapper.pc.in selinux patch.
Comment 12 Alasdair Kergon 2009-10-05 12:56:47 UTC
Part of the export patch can go upstream (some of the fields, not the 'export' option), yes, for completeness.  With the new udev rules, we get what we currently need from sysfs and the prefix on the UUID (which cryptsetup now uses).  We're also going to add some flags so the software (e.g. cryptsetup) causing the udev events can pass requests (like 'don't create a node for this device') directly into the udev rules.
Comment 13 Alasdair Kergon 2009-10-05 13:48:01 UTC
And I've pulled in the bulk of the Makefile changes.  Together with the previous upsteam changes, see if this is enough to fix the builds or whether there are still some bits I missed.
Comment 14 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-10-12 23:06:27 UTC
agk:
I've emailed you a spin of some missed bits from as-needed.
Plus a respin of the --export patch and a discussion about it, unless sysfs gets a lot more data about the DM table, it's not going to work for all the udev rules (eg there's already one that used DM_TARGET_TYPES to control a symlink).
Comment 15 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-12-26 01:38:03 UTC
Closing since we have 2.02.56 in the tree now.
I did report export and one more libdm patch.
Comment 16 Michael Härtl 2010-03-06 16:52:19 UTC
Sorry, but for me this bug still exists:

I can't remove LVM snapshots when udevd is running. I don't know exactly, which update stopped this from working but apparently it happend around Fall 2009. My current versions are:

 sys-fs/lvm2-2.02.56-r2
 sys-fs/udev-149

Let me know if i can provide further information. 

BTW: Couldn't reopen and i'm also not sure, wether it's better to open a new ticket instead. So please advise if this doesn't belong here. Thanks!