After some investigation it looks like vmbuilder is nicely registering a
callback hook to unmap the devices it sets up using kpartx. The problem
is udev rules adding device mappings using kpartx as soon as the raw
device gets partitioned.

AFAIK the relevant udev rule is /lib/udev/rules.d/55-dm.rules. I don't
exactly know how and who creates the mapping but it follows the scheme
/dev/mapper/{DEVICE}p{X}. I first thought it would be
/lib/udev/rules.d/95-kpartx.rules, but this would create
/dev/mapper/{DEVICE}-part{X} mappings.

The kpartx call in vmbuilder does use the scheme /dev/mapper/{DEVICE}{X}
and thus doesn't clash with the set up mappings. But it also doesn't
destroy it in the cleanup call back.

-- 
device mappings for partitions not removed after build using --raw, leading to 
filesystem corruption
https://bugs.launchpad.net/bugs/531599
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to