Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1097819 - Deleting snapshot does not free up block device Actual space allocation
Summary: Deleting snapshot does not free up block device Actual space allocation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 3.4.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: 3.5.0
Assignee: Daniel Erez
QA Contact: Kevin Alon Goldblatt
URL:
Whiteboard: storage
Depends On:
Blocks: 1105848 rhev3.5beta 1156165
TreeView+ depends on / blocked
 
Reported: 2014-05-14 15:19 UTC by Kevin Alon Goldblatt
Modified: 2016-02-10 16:54 UTC (History)
13 users (show)

Fixed In Version: v4.16.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1105848 (view as bug list)
Environment:
Last Closed: 2015-02-16 13:37:09 UTC
oVirt Team: Storage
Target Upstream Version:


Attachments (Terms of Use)
vdsm and engine logs (deleted)
2014-05-14 15:19 UTC, Kevin Alon Goldblatt
no flags Details
Repreoduce and added new vdsm and engine logs (deleted)
2014-05-29 09:14 UTC, Kevin Alon Goldblatt
no flags Details


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 28009 None None None Never

Description Kevin Alon Goldblatt 2014-05-14 15:19:57 UTC
Created attachment 895521 [details]
vdsm and engine logs

Description of problem:
Creating snapshots of block images/disks grows the Actual space allocation of the VM image by 1GB. Deleting the snapshot does not free up this space allocation.

Version-Release number of selected component (if applicable):
vdsm-4.14.7-0.2.rc.el6ev.x86_64
rhevm-3.4.0-0.16.rc.el6ev.noarch

How reproducible:
Happens all the time

Steps to Reproduce:
1. Create a vm with a some disks including 1 iscsi block device
2. Create around 4 snapshots - After each snapshot creation the Actual space of the image grows by 1 GB as expected
3. Delete the last snapshot - the image Actual space remains unchanged. This space should be freed up

Actual results:
The Actual space of the image does not release the 1GB of space of the block disk after deleting a snapshot.
Expected results:
when deleting a snapshot the space previously allocated to the VM image for the block disk should be released.

Additional info:

Comment 1 Allon Mureinik 2014-05-14 21:34:44 UTC
- What do you mean by "the last snapshot"? The active image?
- Do you have a guest running during this time? What is it doing?
- How do you determine the actual space?

Comment 2 Kevin Alon Goldblatt 2014-05-15 07:00:59 UTC
The Actual space as displayed in the UI > Virtual Machine Tab > select your VM > select the Disks tab. Here you will see the Virtual and Actual size of each disk

By "last snapshot" I mean:

Create a vm
Add a few disks including at least 1 block device preallocated disk
No need to install OS

Operation                 Virtual Size of Preallocated disk |Actual Size
-------------------------------------------------------------------------
Create VM with disks                      5G                |  5G
Create snapshot 1                         5G                |  6G
Create snapshot 2                         5G                |  7G
Create snapshot 3                         5G                |  8G
Delete snapshot 3                         5G                |**8G***(should be 7G)

Comment 3 Daniel Erez 2014-05-15 08:31:21 UTC
(In reply to Kevin Alon Goldblatt from comment #2)
> The Actual space as displayed in the UI > Virtual Machine Tab > select your
> VM > select the Disks tab. Here you will see the Virtual and Actual size of
> each disk
> 
> By "last snapshot" I mean:
> 
> Create a vm
> Add a few disks including at least 1 block device preallocated disk
> No need to install OS
> 
> Operation                 Virtual Size of Preallocated disk |Actual Size
> -------------------------------------------------------------------------
> Create VM with disks                      5G                |  5G
> Create snapshot 1                         5G                |  6G
> Create snapshot 2                         5G                |  7G
> Create snapshot 3                         5G                |  8G
> Delete snapshot 3                         5G                |**8G***(should
> be 7G)

Hi Kevin,

Can you please attach the relevant sizes from the underlined storage (to verify if there's an information mismatch).

Comment 4 Kevin Alon Goldblatt 2014-05-29 09:14:44 UTC
Created attachment 900301 [details]
Repreoduce and added new vdsm and engine logs

Comment 5 Kevin Alon Goldblatt 2014-05-29 09:49:40 UTC
Adding comment again as it was not saved before

1. Created a VM with 4 disks as follows

Name         allocaton         Type           Storage Domain   Actual    Virtual
---------------------------------------------------------------------------------
test1_Disk1   preallocation    virtIO        iSCSI            7G         7G
test1_Disk2   preallocation    virtIO-SCSI   iSCSI            5G         5G
test1_Disk3   preallocation    virtIO        nfs              4G         4G
test1_Disk4   preallocation    virtIO-SCSI   nfs              3G         3G 

2. Created snapshot sn1

Name         allocaton         Type           Storage Domain   Actual    Virtual
---------------------------------------------------------------------------------
test1_Disk1   preallocation    virtIO        iSCSI            7G     ++  8G
test1_Disk2   preallocation    virtIO-SCSI   iSCSI            5G     ++  6G
test1_Disk3   preallocation    virtIO        nfs              4G         4G
test1_Disk4   preallocation    virtIO-SCSI   nfs              3G         3G

3.Created snapshot sn2

Name         allocaton         Type           Storage Domain   Actual    Virtual
---------------------------------------------------------------------------------
test1_Disk1   preallocation    virtIO        iSCSI            7G     ++  9G
test1_Disk2   preallocation    virtIO-SCSI   iSCSI            5G     ++  7G
test1_Disk3   preallocation    virtIO        nfs              4G         4G
test1_Disk4   preallocation    virtIO-SCSI   nfs              3G         3G

  
4.Created snapshot sn3

Name         allocaton         Type           Storage Domain   Actual    Virtual
---------------------------------------------------------------------------------
test1_Disk1   preallocation    virtIO        iSCSI            7G     ++ 10G
test1_Disk2   preallocation    virtIO-SCSI   iSCSI            5G     ++  8G
test1_Disk3   preallocation    virtIO        nfs              4G         4G
test1_Disk4   preallocation    virtIO-SCSI   nfs              3G         3G

5.Deleted snapshot sn3

3.Created snapshot sn2

Name         allocaton         Type           Storage Domain   Actual    Virtual
---------------------------------------------------------------------------------
test1_Disk1   preallocation    virtIO        iSCSI            7G   same  10G
test1_Disk2   preallocation    virtIO-SCSI   iSCSI            5G   same  8G
test1_Disk3   preallocation    virtIO        nfs              4G         4G
test1_Disk4   preallocation    virtIO-SCSI   nfs              3G         3G

 ++ test1_Disk1 and test1_Disk2 remained unchanged when the SHOULD have been reduced by 1G each after the delete snapshot operation

Comment 6 Kevin Alon Goldblatt 2014-05-29 09:53:43 UTC
Ignore Previous Comment See corrected comment below:
Adding comment again as it was not saved before

1. Created a VM with 4 disks as follows

Name         allocaton         Type           Storage Domain   Actual    Virtual
---------------------------------------------------------------------------------
test1_Disk1   preallocation    virtIO        iSCSI            7G         7G
test1_Disk2   preallocation    virtIO-SCSI   iSCSI            5G         5G
test1_Disk3   preallocation    virtIO        nfs              4G         4G
test1_Disk4   preallocation    virtIO-SCSI   nfs              3G         3G 

2. Created snapshot sn1

Name         allocaton         Type           Storage Domain   Actual    Virtual
---------------------------------------------------------------------------------
test1_Disk1   preallocation    virtIO        iSCSI            7G     ++  8G
test1_Disk2   preallocation    virtIO-SCSI   iSCSI            5G     ++  6G
test1_Disk3   preallocation    virtIO        nfs              4G         4G
test1_Disk4   preallocation    virtIO-SCSI   nfs              3G         3G

3.Created snapshot sn2

Name         allocaton         Type           Storage Domain   Actual    Virtual
---------------------------------------------------------------------------------
test1_Disk1   preallocation    virtIO        iSCSI            7G     ++  9G
test1_Disk2   preallocation    virtIO-SCSI   iSCSI            5G     ++  7G
test1_Disk3   preallocation    virtIO        nfs              4G         4G
test1_Disk4   preallocation    virtIO-SCSI   nfs              3G         3G

  
4.Created snapshot sn3

Name         allocaton         Type           Storage Domain   Actual    Virtual
---------------------------------------------------------------------------------
test1_Disk1   preallocation    virtIO        iSCSI            7G     ++ 10G
test1_Disk2   preallocation    virtIO-SCSI   iSCSI            5G     ++  8G
test1_Disk3   preallocation    virtIO        nfs              4G         4G
test1_Disk4   preallocation    virtIO-SCSI   nfs              3G         3G


5.DELETED snapshot sn3

Name         allocaton         Type           Storage Domain   Actual    Virtual
---------------------------------------------------------------------------------
test1_Disk1   preallocation    virtIO        iSCSI            7G   same  10G
test1_Disk2   preallocation    virtIO-SCSI   iSCSI            5G   same  8G
test1_Disk3   preallocation    virtIO        nfs              4G         4G
test1_Disk4   preallocation    virtIO-SCSI   nfs              3G         3G

 ++ test1_Disk1 and test1_Disk2 remained unchanged when the SHOULD have been reduced by 1G each after the delete snapshot operation

Comment 11 Allon Mureinik 2014-06-26 17:30:48 UTC
Yeela, this path is included in v4.16.0. Can you please explain why you returned it to MODIFIED?

Comment 12 Kevin Alon Goldblatt 2014-08-12 15:27:10 UTC
The Actual size is now updated with each delete. Moving to Verified


Note You need to log in before you can comment on or make changes to this bug.