Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Include this lvm2 functionality in RHEL7:
+++ This bug was initially created as a clone of Bug #1006072 +++
This is a request to add functionality to LVM to assist with the wiping of LVM volume and snapshot data.
OpenStack Cinder uses LVM to manage volumes containing data used by OpenStack VMs. When a volume, or snapshot of a volume, is deleted, it Cinder currently performs a wipe of the data using dd if=/dev/zero. This is done both to protect data from being exposed across different volumes and tenants, as well as to protect data from being accessed via any method (accessing the storage) after the volume/snapshot has been deleted.
This dd method is problematic because on "thick" snap LVs, the snapshot will fill up before the entire volume size has been written to the snapshot. On thin-provisioned LVs, this has undesirable performance, since the entire snapshot is consumed by the wipe process.
https://bugzilla.redhat.com/show_bug.cgi?id=975052#c11 outlined two ideas for how to improve this situation by having LVM assist in the wipe process:
1) Performing wipes similar to how discards are handled today
2) Allow the delete process to detach the cow volume so that Cinder can wipe it and then delete the LV.
Current thinking is that #1 may not be suitable since it would hang other LVM operations for a long period of time. #2 would be sufficient for this scenario.
--- Additional comment from Alasdair Kergon on 2013-12-03 02:51:17 CET ---
I am experimenting with option 2, to offer an inverse of lvconvert -s.
--- Additional comment from Alasdair Kergon on 2013-12-03 04:46:08 CET ---
# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lvol0 vg1 owi--- 12.00m
lvol1 vg1 swi--- 12.00m lvol0
# lvconvert --splitsnapshot vg1/lvol1
Logical Volume vg1/lvol1 split from its origin.
# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lvol0 vg1 -wi--- 12.00m
lvol1 vg1 -wi--- 12.00m
The snapshot may or may not be active when the command is run.
The origin may have other snapshots too which are left untouched.
After separation, provided no data got changed, the snapshot could be reinstated with lvconvert -s -Zn vg1/lvol0 vg1/lvol1.
At this stage I am only supporting the straightforward case of an original lvm2 snapshot of an origin LV without any thin volumes, mirrors, raid, pvmove, failed merging snapshots etc. involved.
If need be, we can consider support for other combinations in subsequent releases (not on this bugzilla).
--- Additional comment from Alasdair Kergon on 2013-12-04 03:14:42 CET ---
https://git.fedorahosted.org/cgit/lvm2.git/patch/?id=7b65363bf781cd58d45e2d9f12fdfed59b9dee55
Will be included in 2.02.105.
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.