Bug 1430679
| Summary: | Increase the wipe of bytes when build a logical pool which already has a label on target volume device | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Pei Zhang <pzhang> |
| Component: | libvirt | Assignee: | John Ferlan <jferlan> |
| Status: | CLOSED ERRATA | QA Contact: | yisun |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.4 | CC: | dyuan, jferlan, lmen, rbalakri, xuzhang, yisun |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-3.2.0-1.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-01 17:24:15 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Pei Zhang
2017-03-09 09:50:28 UTC
Posted a patch upstream: http://www.redhat.com/archives/libvir-list/2017-March/msg01192.html Pushed patch upstream:
commit 6760cc4bfddb84a8ab33e8b008c0440013c17499
Author: John Ferlan <jferlan>
Date: Fri Mar 24 12:25:27 2017 -0400
logical: Need to overwrite/clear more than just first 512 bytes
...
$ git describe 6760cc4bfddb84a8ab33e8b008c0440013c17499
v3.1.0-382-g6760cc4
$
Verified with libvirt-3.2.0-1.el7.x86_64
Steps:
1. prepare a ext4 block device
## blkid /dev/sdf
/dev/sdf: UUID="62e6c23c-3ace-4029-b5ff-f62e1d4c2496" TYPE="ext4"
2. prepare a logical pool xml
## cat pool.logical
<pool type='logical'>
<name>lpool</name>
<capacity unit='bytes'>0</capacity>
<allocation unit='bytes'>0</allocation>
<available unit='bytes'>0</available>
<source>
<device path='/dev/sdf'/>
<name>logical</name>
<format type='lvm2'/>
</source>
<target>
<path>/dev/ltest</path>
<permissions>
<mode>0755</mode>
</permissions>
</target>
</pool>
3. define the pool
## virsh pool-define pool.logical
Pool lpool defined from pool.logical
4. build the pool without --overwrite
## virsh pool-build lpool
error: Failed to build pool lpool
error: Storage pool already built: Format of device '/dev/sdf' does not match the expected format 'LVM2_member', forced overwrite is necessary
5. build the pool with --overwrite
## virsh pool-build lpool --overwrite
Pool lpool built
6. start the pool
## virsh pool-start lpool
Pool lpool started
7. check the pool existing in pool list
## virsh pool-list | grep lpool
lpool active no
8. check the block device has correct type
## blkid /dev/sdf
/dev/sdf: UUID="9vfnr6-iLfl-WVLL-BBL8-9AIu-ewDA-ulQCbw" TYPE="LVM2_member"
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1846 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1846 |