From: Jenkins <jenkins@review.openstack.org>
Date: Thu, 30 Jan 2014 04:45:40 +0000 (+0000)
Subject: Merge "LVM: Activate source snap LV when cloning from volume"
X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=4b259c6a158e6510a5d9fa1bfd996086220fe7a1;p=openstack-build%2Fcinder-build.git

Merge "LVM: Activate source snap LV when cloning from volume"
---

4b259c6a158e6510a5d9fa1bfd996086220fe7a1
diff --cc cinder/volume/drivers/lvm.py
index 61fa1d12f,220b865d1..d5434ab4f
--- a/cinder/volume/drivers/lvm.py
+++ b/cinder/volume/drivers/lvm.py
@@@ -312,13 -309,13 +312,15 @@@ class LVMVolumeDriver(driver.VolumeDriv
                              self.configuration.lvm_type,
                              mirror_count)
  
+         self.vg.activate_lv(temp_snapshot['name'], is_snapshot=True)
+ 
          try:
 -            volutils.copy_volume(self.local_path(temp_snapshot),
 -                                 self.local_path(volume),
 -                                 src_vref['size'] * 1024,
 -                                 execute=self._execute)
 +            volutils.copy_volume(
 +                self.local_path(temp_snapshot),
 +                self.local_path(volume),
 +                src_vref['size'] * 1024,
 +                self.configuration.volume_dd_blocksize,
 +                execute=self._execute)
          finally:
              self.delete_snapshot(temp_snapshot)