From 17c447e9f06af0afb195d6a2879c06233de520c7 Mon Sep 17 00:00:00 2001 From: Stefan Nica Date: Wed, 20 Sep 2017 13:14:29 +0200 Subject: [PATCH] LVM: Activate thin snapshot before clone activation LVM may be configured to not automatically activate thin-provisioned LVs. Ensure they are activated before activating a clone, otherwise activating the clone may fail. Change-Id: Iaedeb3cdc706daa34db8d50c48cf738f6edb9bcf Related-Bug: #1642111 --- cinder/volume/drivers/lvm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index 885c4487795..48cc3a5db9b 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -416,6 +416,9 @@ class LVMVolumeDriver(driver.VolumeDriver): if volume['size'] > snapshot['volume_size']: LOG.debug("Resize the new volume to %s.", volume['size']) self.extend_volume(volume, volume['size']) + # Some configurations of LVM do not automatically activate + # ThinLVM snapshot LVs. + self.vg.activate_lv(snapshot['name'], is_snapshot=True) self.vg.activate_lv(volume['name'], is_snapshot=True, permanent=True) return