After doing some test to identify what is creating this duplicate set of
dm maps, it seems to be the following 'parted mkpart' commands that
triggers the udev rule :

>From /usr/share/pyshared/VMBuilder/disk.py :

        def create(self, disk):
            """Adds partition to the disk image (does not mkfs or anything like 
that)"""
            logging.info('Adding type %d partition to disk image: %s' % 
(self.type, disk.filename))
            run_cmd('parted', '--script', '--', disk.filename, 'mkpart', 
'primary', self.parted_fstype(), self.begin, self.end)

running the equivalent command while watching the dm tables does show a
new table entry when the 'parted --script {dev} mkpart primary ext2
{beginning} {size}' command is invoked.

Currently, it is unclear to me if the removal of those unnecessary dm
entries should be done by a callback from create() or included in the
existing unmap() callback for map_partitions.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to vm-builder in Ubuntu.
https://bugs.launchpad.net/bugs/531599

Title:
  device mappings for partitions not removed after build using --raw,
  leading to filesystem corruption

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/vm-builder/+bug/531599/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to