Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 557065 - kpartx is inconsistent in how it handles logical partitions
Summary: kpartx is inconsistent in how it handles logical partitions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: device-mapper-multipath
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: LVM and device-mapper development team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F13Blocker, F13FinalBlocker 551790 557845
TreeView+ depends on / blocked
 
Reported: 2010-01-20 10:14 UTC by Hans de Goede
Modified: 2010-02-16 13:14 UTC (History)
9 users (show)

Fixed In Version: 0.4.9-6.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 557845 (view as bug list)
Environment:
Last Closed: 2010-02-16 13:14:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Hans de Goede 2010-01-20 10:14:46 UTC
This bug mainly is the result of a long long long debugging session to hunt down bug 551790.

The problem is triggered by partitions on dmraid sets being activated with kpartx now a days as that can handle gpt partition tables, which dmraid itself cannot.

When anaconda runs from the livecd environment the dmraid set and its
partitions mappings are already setup by dmraid + kpartx. In the normal
install environment this is not the case, so anaconda tries to activate the
sets itself using python-pyblock (which uses libdmraid + libparted + devicemapper for this).

This is not a problem as python-pyblock contains code to detect if it is trying to add an already existing mapping (like in the livecd case), and in that case does nothing.

Things get troublesome however when there are logical partitions on the disk. The problem is that kpartx creates linear mappings of the extended partition for these instead of creating linear mappings directly of the disk. python-pyblock however does create linear mappings directly of the disk for the logical partitions. So the is this mapping already present check fails, after
which the map creation fails and anaconda aborts.

My first reaction when I finally figured this out was to modify python-pyblock to match kpartx behavior. But then I realized other tools might be bitten by the too, and indeed they are:

parted:
Cannot change the partition mappings of a dmraid device with logical partitions activated with kpartx, as it expects logical partitions to be linear mappings
of the disk (not the extended partitions), and thus fails to remove the old
mappings when trying to re-create the mappings to match changes made to the disk. So even if the entire raidset is not mounted / used in anyway a reboot
is required to get the kernel to see the new partition table.

python-pyblock:
See above

dmraid:
Cannot stop a raid set (dmraid -an) with logical partitions, even if it
is not gpt, as it too expects linear mappings directly of the disk.


So I've come to the conclusion that it is not python-pyblock which needs to change, but kpartx as that is the only one handling mapping of logical
partitions in this way.

Comment 1 Hans de Goede 2010-01-20 10:20:41 UTC
Making this block F13Blocker, as this makes it impossible to install Fedora on
dmraid systems with logical partitions (for which we have received several bugs
for F-12).

Comment 2 Milan Broz 2010-01-20 16:18:30 UTC
Btw see also 475283 - it was even broken some time ago using wrong offset...

Comment 3 Ben Marzinski 2010-01-25 22:21:37 UTC
Fixed. kpartx now deals with logical partitions just the same as it did in RHEL5/F-9.  They are the build on top of the whole device.

Comment 4 Fedora Update System 2010-01-25 22:43:16 UTC
device-mapper-multipath-0.4.9-6.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/device-mapper-multipath-0.4.9-6.fc12

Comment 5 Fedora Update System 2010-01-27 01:12:27 UTC
device-mapper-multipath-0.4.9-6.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update device-mapper-multipath'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1129

Comment 6 Fedora Update System 2010-02-16 13:14:22 UTC
device-mapper-multipath-0.4.9-6.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.