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
This commit is contained in:
parent
6c236bca3d
commit
17c447e9f0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user