VM and VDI deleted, but Space on Storage still used

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

VM and VDI deleted, but Space on Storage still used

Tobias Matthaeus
Hello everyone,



I deleted a VM and the assigned VDI. But the space on the SR is still used. It seems, that xenserver delete the VDI but not delete the LVM.

The command "lvscan" show me the existings LVMs and there is the LVM from the deleted VDI. Is this a bug?
I know, I can remove it with lvremove. But is it okay, that the storage place will not be freed automaticly?


[root@xen0 log]# lvscan
  inactive          '/dev/VG_XenStorage-c3a768e5-8461-884e-bc2d-dc6584b648c3/MGT' [4.00 MB] inherit
  inactive          '/dev/VG_XenStorage-43757365-6aeb-4ff2-d64c-e2066bae5de9/MGT' [4.00 MB] inherit
  inactive          '/dev/VG_XenStorage-43757365-6aeb-4ff2-d64c-e2066bae5de9/VHD-b24f0e7d-2577-4cbd-a5c4-18fe7dbd7020' [8.02 GB] inherit
  inactive          '/dev/VG_XenStorage-43757365-6aeb-4ff2-d64c-e2066bae5de9/VHD-3d89e0e8-4321-4f6f-88c5-c1ab268187cd' [8.02 GB] inherit
  inactive          '/dev/VG_XenStorage-43757365-6aeb-4ff2-d64c-e2066bae5de9/VHD-e56c44a0-5f2d-43c2-8333-214ccc7cf0cd' [8.02 GB] inherit
  inactive          '/dev/VG_XenStorage-43757365-6aeb-4ff2-d64c-e2066bae5de9/VHD-2591071c-e552-4b5b-a925-e34a46db40fd' [8.02 GB] inherit
  ACTIVE            '/dev/VG_XenStorage-43757365-6aeb-4ff2-d64c-e2066bae5de9/VHD-2b2d7602-cd6b-4cbd-8c04-c714281964d5' [8.02 GB] inherit
  inactive          '/dev/VG_XenStorage-43757365-6aeb-4ff2-d64c-e2066bae5de9/VHD-42a96426-c33c-46b3-887c-ca9b57b8bc1b' [8.02 GB] inherit




Thanks and regards



Tobi



--

Tobias Matthaeus
Technik                                  [hidden email]
Carmunity.com GmbH        http://www.carmunity.de
Mary-Astell-Str. 2                 T: +49-421-6265 130
28359 Bremen                     F: +49-421-6265 100
Deutschland

Handelsregisternummer:
HRB 19256 beim AG Bremen
Geschäftsführer:
Stefan Kathmeyer


_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: VM and VDI deleted, but Space on Storage still used

Mike McClurg
On 24/05/11 15:29, Tobias Matthaeus wrote:
> Hello everyone,
>
>
>
> I deleted a VM and the assigned VDI. But the space on the SR is still used. It seems, that xenserver delete the VDI but not delete the LVM.
>
> The command "lvscan" show me the existings LVMs and there is the LVM from the deleted VDI. Is this a bug?
> I know, I can remove it with lvremove. But is it okay, that the storage place will not be freed automaticly?

You shouldn't delete LVs yourself. There isn't a one-to-one mapping of
VHDs to LVs, and the data may be spread between several LVs. Please
refer to this document first: http://support.citrix.com/article/CTX122978

If this doesn't explain your situation, please come back and let us
know. It's not inconceivable that you've found a bug ;)

Mike

_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: VM and VDI deleted, but Space on Storage still used

Tobias Matthaeus
Hallo Mike,



> You shouldn't delete LVs yourself. There isn't a one-to-one mapping of VHDs to LVs, and the data may be spread between several LVs. Please refer to this document first: http://support.citrix.com/article/CTX122978
>
> If this doesn't explain your situation, please come back and let us know. It's not inconceivable that you've found a bug ;)


Okay, but I think that the document does not explain my situation. The situation is the following:

New Xen-Servers for XenPool and two new Hardware HBAs (EonStore). Today I created a VirtualMachine on a new and completely unused HBA. After VM creation on the Storage 8GB is used. Okay, that is the size of the disk.
During machine uptime lvscan show the following situation:

[root@xen0 ~]# lvscan
  inactive          '/dev/VG_XenStorage-c3a768e5-8461-884e-bc2d-dc6584b648c3/MGT' [4.00 MB] inherit
  inactive          '/dev/VG_XenStorage-c3a768e5-8461-884e-bc2d-dc6584b648c3/VHD-c54e79b3-2214-46d1-b2a1-6ff313f31c45' [8.02 GB] inherit
  ACTIVE            '/dev/VG_XenStorage-43757365-6aeb-4ff2-d64c-e2066bae5de9/VHD-2b2d7602-cd6b-4cbd-8c04-c714281964d5' [8.02 GB] inherit


After shutdown the VM lvscan show the following situation:

[root@xen0 ~]# lvscan
  inactive          '/dev/VG_XenStorage-c3a768e5-8461-884e-bc2d-dc6584b648c3/MGT' [4.00 MB] inherit
  inactive          '/dev/VG_XenStorage-c3a768e5-8461-884e-bc2d-dc6584b648c3/VHD-c54e79b3-2214-46d1-b2a1-6ff313f31c45' [8.02 GB] inherit
  ACTIVE            '/dev/VG_XenStorage-43757365-6aeb-4ff2-d64c-e2066bae5de9/VHD-2b2d7602-cd6b-4cbd-8c04-c714281964d5' [8.02 GB] inherit


I deleted via Windows XenCentre the VM and the Disk. But LVSCAN shows me, that the LVs still exists:
[root@xen0 ~]# lvscan
  inactive          '/dev/VG_XenStorage-c3a768e5-8461-884e-bc2d-dc6584b648c3/MGT' [4.00 MB] inherit
  inactive          '/dev/VG_XenStorage-c3a768e5-8461-884e-bc2d-dc6584b648c3/VHD-c54e79b3-2214-46d1-b2a1-6ff313f31c45' [8.02 GB] inherit
  ACTIVE            '/dev/VG_XenStorage-43757365-6aeb-4ff2-d64c-e2066bae5de9/VHD-2b2d7602-cd6b-4cbd-8c04-c714281964d5' [8.02 GB] inherit


vgdisplay and the xenCentre show me, that 8GB is used on the storage. But I deleted the disk, the checkbox was marked.

[root@xen0 ~]# vgdisplay VG_XenStorage-c3a768e5-8461-884e-bc2d-dc6584b648c3
  --- Volume group ---
  VG Name               VG_XenStorage-c3a768e5-8461-884e-bc2d-dc6584b648c3
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  8
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               2.73 TB
  PE Size               4.00 MB
  Total PE              715204
  Alloc PE / Size       2055 / 8.03 GB
  Free  PE / Size       713149 / 2.72 TB
  VG UUID               2sRGtQ-gQFk-lmDG-yIln-8S1U-VZUW-YLjJbJ




I do not understand, why after VM deleting the space is still used and not be freed. It is still in use on the storage...



Can you help me?



Thanks and Regards




Tobi




--

Tobias Matthaeus
Technik                                  [hidden email]
Carmunity.com GmbH        http://www.carmunity.de
Mary-Astell-Str. 2                 T: +49-421-6265 130
28359 Bremen                     F: +49-421-6265 100
Deutschland

Handelsregisternummer:
HRB 19256 beim AG Bremen
Geschäftsführer:
Stefan Kathmeyer


_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xensource.com/xen-users
Reply | Threaded
Open this post in threaded view
|

Re: VM and VDI deleted, but Space on Storage still used

ross
I have the same problem on all of my Xen Servers 5.5/5.6. Create a new Virtual disk on a Local Storage LVM (200Gb), then delete it, the Space is never released. This must be a bug in Xen.
They only way I have found is to use LMREMOVE (rather scarey)

Do the same on a LVM over iSCSI, the space is released.
Reply | Threaded
Open this post in threaded view
|

Re: VM and VDI deleted, but Space on Storage still used

angeloxo
In reply to this post by Tobias Matthaeus
Hello, I have the same Issue. After delete VM's, LVMs remains.

>lvscan
 inactive          '/dev/VG_XenStorage-d54ead56-0aa0-6456-fb22-efdca87af607/MGT' [4.00 MB] inherit
 inactive          '/dev/VG_XenStorage-d54ead56-0aa0-6456-fb22-efdca87af607/LV-b1a16609-fad9-4cce-a9ba-dfb4f4815034' [256.00 MB] inherit
 ACTIVE            '/dev/VG_XenStorage-d54ead56-0aa0-6456-fb22-efdca87af607/VHD-97799655-02a1-4aee-8bdc-d1f372213033' [11.47 GB] inherit
 ACTIVE            '/dev/VG_XenStorage-d54ead56-0aa0-6456-fb22-efdca87af607/VHD-12d75f08-8890-405b-
etc...

All Inactive LVM's sumarize more than 100Gb!.
How I can Purge these files safetly ?

Thanks and regards
Angel.
Reply | Threaded
Open this post in threaded view
|

Re: VM and VDI deleted, but Space on Storage still used

Ivan Fitenko
I have the same problem with one of my lab installations. Usually, plain

# lvremove /dev/VG_XenStorage-$PUT_YOUR_UUID_HERE

helps.

On some rare occasions, however, it didn't help until reboot, but I didn't have a chance to debug that further yet.

On Mon, Dec 10, 2012 at 05:35:38AM -0800, angeloxo wrote:

> Hello, I have the same Issue. After delete VM's, LVMs remains.
>
> >lvscan
>  inactive        
> '/dev/VG_XenStorage-d54ead56-0aa0-6456-fb22-efdca87af607/MGT' [4.00 MB]
> inherit
>  inactive        
> '/dev/VG_XenStorage-d54ead56-0aa0-6456-fb22-efdca87af607/LV-b1a16609-fad9-4cce-a9ba-dfb4f4815034'
> [256.00 MB] inherit
>  ACTIVE          
> '/dev/VG_XenStorage-d54ead56-0aa0-6456-fb22-efdca87af607/VHD-97799655-02a1-4aee-8bdc-d1f372213033'
> [11.47 GB] inherit
>  ACTIVE          
> '/dev/VG_XenStorage-d54ead56-0aa0-6456-fb22-efdca87af607/VHD-12d75f08-8890-405b-
> etc...
>
> All Inactive LVM's sumarize more than 100Gb!.
> *How I can Purge these files safetly ?*
>
> Thanks and regards
> Angel.
>
>
>
> --
> View this message in context: http://xen.1045712.n5.nabble.com/VM-and-VDI-deleted-but-Space-on-Storage-still-used-tp4422234p5712808.html
> Sent from the Xen - User mailing list archive at Nabble.com.
>
> _______________________________________________
> Xen-users mailing list
> [hidden email]
> http://lists.xen.org/xen-users

_______________________________________________
Xen-users mailing list
[hidden email]
http://lists.xen.org/xen-users