[Parted-maintainers] Bug#684713: parted: support for partitioned MD devices

Miquel van Smoorenburg miquels at debian.org
Mon Aug 13 10:41:33 UTC 2012


Package: parted
Version: 2.3-10
Severity: serious
Tags: patch wheezy sid

Background: I have added support to the debian installer for installation
on Intel Matrix Raid (imsm) arrays as supported by mdadm (I'll
be submitting patches to debian-boot soon).

When installing on such an array, partitions are created directly
on the array (e.g. /dev/md0). Before kernel 2.6.28, partitionable
md arrays were seperate from 'normal' md arrays (different dev_t's),
but since 2.6.28 that has been consolidated.

However, there is one minor oversight/bug in the kernel: the
sysfs "range" key is still set to "1" for md arrays. That means
libparted thinks that it's not possible to partition that device,
where in fact it is.

The attached patch reckognizes that situation: if running on
a kernel >= 2.6.28, and the device is a PED_DEVICE_MD, and the
sysfs 'range' key is set to '1', _device_get_partition_range()
returns MAX_NUM_PARTS instead.

Please consider this patch for wheezy.

Suggested changelog entry:

  * starting at kernel 2.6.28, MD devices can be partitioned, but the sysfs
    "range" key only shows support for one partition/device. Ignore that
    setting if it's set to "1" and the kernel version is >= 2.6.28.

Mike.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: md-partitions.patch
Type: text/x-diff
Size: 646 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/parted-maintainers/attachments/20120813/0444558d/attachment.patch>


More information about the Parted-maintainers mailing list