Comment 12 for bug 620027

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

I commented out the pvcreate command under _init_volume_group

def _init_volume_group(self):
        if FLAGS.fake_storage:
            return
        #yield process.simple_execute(
        # "sudo pvcreate %s" % (FLAGS.storage_dev))
        yield process.simple_execute(
                "sudo vgcreate %s %s" % (FLAGS.volume_group,
                                         FLAGS.storage_dev))

and let nova-volume create the group and the physical disk in one go. The command's output looks like below:

No physical volume label read from /dev/loop0
  Physical volume "/dev/loop0" successfully created
  Volume group "nova-volumes" successfully created

when I run nova-volume as daemon I finally get the volume group created!! I know it does not sound like a bug fix, but commenting pvcreate out does circumvent the problem.

If vgcreate takes care of the "pvcreation" too, would it make sense to have just one simple_execute call?