The create_volume_from_snapshot() and migrate_volume() use
dd command for data copy, but the copy always copies full blocks
even if the source data contains many null or zero blocks.
When we use thin provisioned LVM, blocks are not pre-allocated,
so unused region returns zero.
If we copy full block for destination volume, unnecessary blocks
will be allocated and the usage will be 100%.
The dd command has conv=sparse option in order to copy data more
efficiently. This patch enables conv=sparse option for
create_volume_from_snapshot() and migrate_volume() when we use
thin provisioned LVM.
Reviewed: https:/ /review. openstack. org/200237 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=8a944bc8573 eee775de8ea9831 91e0a4e808aaba
Committed: https:/
Submitter: Jenkins
Branch: master
commit 8a944bc8573eee7 75de8ea983191e0 a4e808aaba
Author: Mitsuhiro Tanino <email address hidden>
Date: Thu Jul 9 16:04:25 2015 -0400
LVM: Support efficient data copy for LVM driver
The create_ volume_ from_snapshot( ) and migrate_volume() use
dd command for data copy, but the copy always copies full blocks
even if the source data contains many null or zero blocks.
When we use thin provisioned LVM, blocks are not pre-allocated,
so unused region returns zero.
If we copy full block for destination volume, unnecessary blocks
will be allocated and the usage will be 100%.
The dd command has conv=sparse option in order to copy data more volume_ from_snapshot( ) and migrate_volume() when we use
efficiently. This patch enables conv=sparse option for
create_
thin provisioned LVM.
Change-Id: I104c4127bc4a33 da9c11ad2aac937 66f862e2981
Closes-bug: #1472486