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.
Description of problem:
I create a volume with xml
<volume>
<name>vol-raw</name>
<capacity unit="G">1</capacity>
<allocation unit='G'>1</allocation>
<target>
<path>/var/lib/libvirt/images/vol-raw</path>
<format type="raw"/>
</target>
</volume>
on dir/fs pool and get the vol-info
# virsh vol-info --pool dir_pool vol-raw
Name: vol-raw
Type: file
Capacity: 1.00 GB
Allocation: 1.00 GB
after I wipe the volume and see the vol-info, the allocation still 1G. If I allocation with 1023M, then after volume wiping, the allocation will change to 0.
Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.159.el6.x86_64
libvirt-0.8.7-18.el6.x86_64
kernel-2.6.32-130.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
1. define and start a dir/fs pool with
<pool type='dir'>
<name>dir_pool</name>
<uuid>70a7eb15-6c34-ee9c-bf57-69e8e5ff3fb2</uuid>
<capacity>0</capacity>
<allocation>0</allocation>
<available>0</available>
<source>
</source>
<target>
<path>/var/lib/libvirt/images</path>
<permissions>
<mode>0700</mode>
<owner>0</owner>
<group>0</group>
<label>some_label_t</label>
</permissions>
</target>
</pool>
# virsh pool-define /tmp/dir_pool.xml
# virsh pool-start dir_pool
2. create raw type volume with xml
<volume>
<name>vol-raw</name>
<capacity unit="G">1</capacity>
<allocation unit='G'>1</allocation>
<target>
<path>/var/lib/libvirt/images/vol-raw</path>
<format type="raw"/>
</target>
</volume>
# virsh vol-info --pool dir_pool vol-raw
Name: vol-raw
Type: file
Capacity: 1.00 GB
Allocation: 1.00 GB
3. wipe volume
# virsh vol-wipe --pool dir_pool vol-raw
4. see vol-info
# virsh vol-info --pool dir_pool vol-raw
Name: vol-raw
Type: file
Capacity: 1.00 GB
Allocation: 1.00 GB
Actual results:
allocation still 1G
Expected results:
allocation should be 0G
Additional info:
> Actual results:
> allocation still 1G
>
> Expected results:
> allocation should be 0G
This is a mis-understanding of what wipe will do.
The 'wipe' operation is defined to clear all data in the file, such that future reads return all zeros. The effect of 'wipe' on the allocation is left undefined, though the ideal goal is to preserve the existing allocation as closely as possible.
Currently if the file is fully allocated, it will remain fully allocated. If it is at all sparse, it will be made completely sparse.
Description of problem: I create a volume with xml <volume> <name>vol-raw</name> <capacity unit="G">1</capacity> <allocation unit='G'>1</allocation> <target> <path>/var/lib/libvirt/images/vol-raw</path> <format type="raw"/> </target> </volume> on dir/fs pool and get the vol-info # virsh vol-info --pool dir_pool vol-raw Name: vol-raw Type: file Capacity: 1.00 GB Allocation: 1.00 GB after I wipe the volume and see the vol-info, the allocation still 1G. If I allocation with 1023M, then after volume wiping, the allocation will change to 0. Version-Release number of selected component (if applicable): qemu-kvm-0.12.1.2-2.159.el6.x86_64 libvirt-0.8.7-18.el6.x86_64 kernel-2.6.32-130.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1. define and start a dir/fs pool with <pool type='dir'> <name>dir_pool</name> <uuid>70a7eb15-6c34-ee9c-bf57-69e8e5ff3fb2</uuid> <capacity>0</capacity> <allocation>0</allocation> <available>0</available> <source> </source> <target> <path>/var/lib/libvirt/images</path> <permissions> <mode>0700</mode> <owner>0</owner> <group>0</group> <label>some_label_t</label> </permissions> </target> </pool> # virsh pool-define /tmp/dir_pool.xml # virsh pool-start dir_pool 2. create raw type volume with xml <volume> <name>vol-raw</name> <capacity unit="G">1</capacity> <allocation unit='G'>1</allocation> <target> <path>/var/lib/libvirt/images/vol-raw</path> <format type="raw"/> </target> </volume> # virsh vol-info --pool dir_pool vol-raw Name: vol-raw Type: file Capacity: 1.00 GB Allocation: 1.00 GB 3. wipe volume # virsh vol-wipe --pool dir_pool vol-raw 4. see vol-info # virsh vol-info --pool dir_pool vol-raw Name: vol-raw Type: file Capacity: 1.00 GB Allocation: 1.00 GB Actual results: allocation still 1G Expected results: allocation should be 0G Additional info: