Bug#591977: kpartx: udev autostart + strict matching for removal == bad idea

Guido Günther agx at sigxcpu.org
Fri Aug 6 19:17:45 UTC 2010


severity 591977 wishlist

On Fri, Aug 06, 2010 at 08:59:28PM +0200, me at perso.beuc.net wrote:
> Package: kpartx
> Version: 0.4.8+git0.761c66f-9
> Severity: important
> 
> When using 'kpartx -d', one has to provide the exact same filename than used for addition (no symlinks, same relative path, etc.).
> In addition, kpartx installs files in /etc/udev to automatically map some devices.
> Consequently, when I had a disk image in LVM, and wish to remove it, the disk image is considered in use, and I don't know any way to remove the device mapping.
> 
> Typically dm-7:
> # ll /dev/mapper/
> total 0
> crw------- 1 root root 10, 59  3 août  20:01 control
> [...]
> lrwxrwxrwx 1 root root      7  6 août  20:40 VG0-test1--boot -> ../dm-6
> lrwxrwxrwx 1 root root      7  6 août  20:39 VG0-test1--bootp1 -> ../dm-7
> lrwxrwxrwx 1 root root      7  6 août  20:31 VG0-test1--root -> ../dm-5
> 
> I would suggest either making kpartx less strict wrt matching disk image paths (e.g. symlinks support, like mount), or place the udev rules in doc/examples instead of enabling them by default.
> 
> (well, I suppose that kpartx is the culprit, the 'bootp1' files is added as soon as I add a partition with 'parted')

No it isn't, the udev rule adds -partX partition names and it only
matches on dmraid an multipath devices so something else is wrong with
your system. 
Set udev to debugging and see what creates the link.

Removal of the strict matching could be implemented, but that's an
enhandement.
Cheers,
 -- Guido





More information about the pkg-lvm-maintainers mailing list