[parted-devel] "linux: use devicemapper task name instead of device node name" causes dmraid breakage
Hans de Goede
hdegoede at redhat.com
Mon May 17 14:25:23 UTC 2010
Hi,
On 05/17/2010 03:37 PM, Phillip Susi wrote:
> On 5/17/2010 7:37 AM, Colin Watson wrote:
>> IIRC the member of udev upstream who works for us disagrees with this
>> naming scheme; Scott, could you comment?
>
> I'm not sure I like the naming scheme either. The p suffix on dev nodes
> normally indicates that the minor number differs from the containing dev
> node without the p to indicate it is a partition. Since the kernel
> device mapper does not currently support partitions, dmraid creates new
> dm devices to map the partitions. This means that if dm-0 is the raid
> array, then it sounds like with these changes, the partition will be
> created as /dev/dm-0p1
Erm, no the purpose of the patch you are suggesting to revert is exactly
to make sure that the partition will be created as /dev/mapper/foop1 independent
of the lvm2 version. And dependent on the lvm2 version /dev/mapper/foo1 will
either be a device node with the same major and minor as /dev/dm-1, or a symlink
to /dev/dm-1.
> though the kernel name of the device is dm-1.
> How would udev even know it should name the node dm-0p1 if the kernel
> name is dm-1?
>
Because it uses the devicemapper name, as shown for example in "dmsetup table"
output as the name for the symlink under /dev/mapper.
>>> Likewise kpartx (which one should use rather then dmraid's build
>>> in partition code as kpartx can handle gpt labels too and dmraid
>>> cannot), also creates partition mappings with a p in the name
>>> by default.
>
> I would really like to remove the partition code from the kernel and let
> udev handle it with partx. One thing I've been wondering about is why
> it seems others like kpartx instead of the original partx?
>
Because partx only works on devices for which the kernel supports partitions,
where as kpartx also works on other devices as it uses devicemapper
Regards,
Hans
More information about the parted-devel
mailing list