[linux-lvm] unwanted autocreation of /dev/mapper/ entries while using parted on lvm devices

Peter Rajnoha prajnoha at redhat.com
Mon Feb 24 08:41:03 UTC 2014

On 02/23/2014 11:36 PM, Oliver Rath wrote:
> Hi List,
> Im not sure, if the udev-rules of lvm is creating this. Im Using Ubuntu
> 12.04.4 + lvm git yesterday, compiles with --enable-udev_sync
> --enable-udev_rules. Here my testing results:
> root at dmicrash\:rules.d# vgcreate myvg /dev/sdc1 /dev/sdd1
>   Volume group "myvg" successfully created
> root at dmicrash\:rules.d# lvcreate --name test --size 20G myvg
>   Logical volume "test" created
> root at dmicrash\:rules.d# parted /dev/myvg/test mklabel msdos
> root at dmicrash\:rules.d# parted /dev/myvg/test mkpart primary  0% 40%
> root at dmicrash\:rules.d# ls /dev/mapper/
> control  myvg-test  myvg-test1
> The device myvg-test1 was created automatically (normally this is done
> by kpartx?). I disabled gnome-automounter, didnt help.
> I tried to monitor this with udevadm --monitor, but i didnt get
> displayed the rule-file who did this.
> Any hints?

The parted itself creates a new device-mapper mapping that represents
the partition. Then it's like any other device-mapper device and so
the /dev content is created by 10-dm-disk.rules (the /dev/mapper
content) and 13-dm-disk.rules (the /dev/disk content).

Parted has this functionality integrated so there's no need to call
kpartx in addition.


More information about the linux-lvm mailing list