Jump to content
Updated Privacy Statement
  • 0

VHD files not getting deleted after removing VM and disk using XenCenter


Kohl Adams

Question

Hello,

I'm currently using XenCenter and XenServer version 6.0. Using XenCenter gui, I went ahead and removed a VM and the following 2 disks attached to it:

uuid ( RO) : d7d556d8-99d1-4d68-8b9b-d1cf4ef095f0
name-label ( RW): server01 opt disk
name-description ( RW): server01 opt disk

uuid ( RO) : 2e8b6e37-a728-49f4-a087-dda943d98836
name-label ( RW): server01 root disk
name-description ( RW): server01 root disk

The 2e8b6e37-a728-49f4-a087-dda943d98836.vhd* 8GB file was removed from the SR location without any issues but the *d7d556d8-99d1-4d68-8b9b-d1cf4ef095f0.vhd 50GB is still sitting inside the SR location.

I ran xe vdi-list and both disks don't show anymore. Why is this happening and can I just manually remove the d7d556d8-99d1-4d68-8b9b-d1cf4ef095f0.vhd fle ?

Thanks in advanced.

Link to comment

19 answers to this question

Recommended Posts

  • 0

I have the same thing going on with xen server 5.6.2. I run snap shots using phdvirtual for backups. I'm wondering if this is causing the issue. The properties on the SR are showing 704 of 709gig used. This is incorrect there is only 400 gig of disk used. I tried using the coalesce utility and this is not correcting the issue. I'm not seeing any snapshots either. Thoughts.

Link to comment
  • 0

the storage issue and the lack of space when the PHD is in action is a legacy now. I am not sure when there will be a fix for such problems

the only workaround to deal with this is to move/copy the vm to another storage which will coalesce the disks.
Coalesce what i have seen fails in the cases where the vdis are corrupt or the chains consisting of more than 32 vdis.

Link to comment
  • 0

Here is the output from the command:

: 6b93e0ef-fa87-6048-e6ed-a6bc7a7e093e
name-label ( RW): iSCSI virtual SAS 700Gig
name-description ( RW): iSCSI SR [172.31.2.161 (iqn.1992-04.com.emc:cx.sl7e2100300037.b1)]
host ( RO): <shared>
allowed-operations (SRO): forget; VDI.create; VDI.snapshot; plug; update; destroy; VDI.destroy; scan; VDI.clone; VDI.resize; unplug
current-operations (SRO):
VDIs (SRO): ba5341f8-f801-4d7a-a19f-9eda2a865468
PBDs (SRO): 2121e7be-9d3a-f828-7216-176fd0b9db4d; 40fb71d6-6b5c-865a-0285-e43b4dade7c3; 8aefef09-a48b-bd2c-ae86-7ff2d55ada71; 3934bcfd-821e-4936-5529-45b51b49e5d8
virtual-allocation ( RO): 2631409860608
physical-utilisation ( RO): 376556224512
physical-size ( RO): 761270370304
type ( RO): lvmoiscsi
content-type ( RO):
shared ( RW): true
other-config (MRW): auto-scan: false
sm-config (MRO): allocation: thick; use_vhd: true; multipathable: true; devserial: scsi-3600601604f3028007c5f93d3cc3ee211
blobs ( RO):
local-cache-enabled ( RO): false
tags (SRW):

Link to comment
  • 0

cool.. this is lvmoiscsi as i was suspecting so it is thick provisioned. Now can you please run the this script as
perl FindOrpahnVDI.pl <sr-uuid>. this will tell you what are the orphan vdi and can be deleted.
Make sure it will list the HA disks as orphan as well. You can confirm by running xe vbd-list vdi-uuid=<> and if it returns to prompt, you can delete the vdi.

FindOrphanVDI.pl

Link to comment
  • 0

it will list all the vdis which do not have a vbd connection with them. A vbd is block device and a connector to the vm and the vdi, it wille xists even if the vm is shutdown.

it will only list the vdi-uuid and would not delete them, you would need to delete them using xe vdi-destroy uuid=<>
now the big question how can we judge if it is listing the correct vdi, simply run xe vbd-list vdi-uuid=<> and xe vdi-list uuid=<vdi-uuid>( this will give info about the vdi in xapi DB, but the main is the former command), if returns to the prompt in xe vbd-list then simply don;t think much, go ahead and delete it.

hope this helps.

Link to comment
  • 0

That means there are no orphan disk, i tested the same script in my lab server and it gave the expected results. Another conclusion is that there re no orphan disks attached. Please attach the output of the vhd-util scan -f -c -m "VHD-*" -l VG_XenStroage-<sr-uuid> -p and lvscan | grep <sr-uuid>. here. let me have a look.

Link to comment
  • 0

Here is the result of : vhd-util scan -f -c -m "VHD-*" -l VG_XenStroage-6b93e0ef-fa87-6048-e6ed-a6bc7a7e093e -p

scan failed: -22

and here are the results of the 2nd command:

lvscan | grep 6b93e0ef-fa87-6048-e6ed-a6bc7a7e093e
/dev/sdq: read failed after 0 of 4096 at 0: Input/output error
/dev/sdag: read failed after 0 of 4096 at 0: Input/output error
/dev/sdd: read failed after 0 of 4096 at 0: Input/output error
/dev/sdt: read failed after 0 of 4096 at 0: Input/output error
/dev/sde: read failed after 0 of 4096 at 0: Input/output error
/dev/sdu: read failed after 0 of 4096 at 0: Input/output error
/dev/sdf: read failed after 0 of 4096 at 0: Input/output error
/dev/sdv: read failed after 0 of 4096 at 0: Input/output error
/dev/sdg: read failed after 0 of 4096 at 0: Input/output error
/dev/sdw: read failed after 0 of 4096 at 0: Input/output error
/dev/sdh: read failed after 0 of 4096 at 0: Input/output error
/dev/sdx: read failed after 0 of 4096 at 0: Input/output error
/dev/sdj: read failed after 0 of 4096 at 0: Input/output error
/dev/sdz: read failed after 0 of 4096 at 0: Input/output error
/dev/sdk: read failed after 0 of 4096 at 0: Input/output error
/dev/sdaa: read failed after 0 of 4096 at 0: Input/output error
inactive '/dev/VG_XenStorage-6b93e0ef-fa87-6048-e6ed-a6bc7a7e093e/MGT' [4.00 MB] inherit
inactive '/dev/VG_XenStorage-6b93e0ef-fa87-6048-e6ed-a6bc7a7e093e/VHD-ba5341f8-f801-4d7a-a19f-9eda2a865468' [350.69 GB] inherit

Link to comment
  • 0

Hi,
I have a question, I am using citrix xencenter 6.5.0 and in one compute i accidently deleted .vhd file of one VM and after reboot VM didn't started again by giving error vdi not available. I have checked VDI and VBD, VBD is connected with the VM and VDI is not connected with the VM, I want to know how can i recover vhd files back so that and how can i connect same vdi with the VM so that it will boot and start. Please help me with this. I have an important DB with this VM. How do i recover deleted vhd file? 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...