Community
 
 
 

CloudPlatform 4.x

284フォロワー
 
Avatar
Pankaj Paliwal

Lots of Templates showing in XenCenter

Avatar

Lots of Templates showing in XenCenter

Hi, can anyone assist

We have v4.2.0 running on 2 XenServer hosts, using several iSCSI storage repositories (Dell Equalogic)

I am trying to tidy up our current template offerings and i have noticed that there are more templates showing in Xencenter (when viewing the SR - Storage tab) than in the main GUI.

All that shows in XenCentrer is "Template <UUID>" however that UUID doesnt match up with the ID that the GUI has for each template

Is there any way i can match up what each template is so i know which can be deleted ? presumably some must be spare but even if they arent it would be useful to know which is which? They always say 0% on disk but the total does seem to take up space

Thanks

Jon


Matthew Darnell MEMBERS
8件のコメント
0

サインインしてコメントを残してください。

 
 

Previous 8件のコメント

Avatar
Pankaj Paliwal
Avatar

Lots of Templates showing in XenCenter

ok, just to update this:

 

I have figure dout how to query the MySQL DB to check the templates, as well as also checking for non removed volumes etc. I have run the ListCapacity APi etc and from what i can gather, all SR's are below 80% yet the "Storage" in Zone Details is showing as 95% (4.3TB of 4.5TB).

 

Even though the combined SR total space is 4.5TB and Allocated is 3.5TB

 

Is there any way i can figure out what is using the additional 800GB ?


Matthew Darnell MEMBERS
コメントアクション パーマリンク
Avatar
Pankaj Paliwal
Avatar

First I want to cover how CCP treats templates in primary and secondary store. Sorry if this is only review, for you.

 

When you upload/register a new template, the secondary storage VM downloads the template into the "secondary storage" NFS volume. When a virtual instance is launched, using a template, CCP decides which "primary storage" SR it should live on. If that SR already contains a copy of template, CCP asks XenServer to clone into a new VDI. If the SR doesn't contain a copy of the template, one is made from the NFS volume and the previous cloning process is performed within the SR.

 

I don't know of an easy way to match the copies of the templates in the SRs to the templates uploaded into secondary storage, but you would likely need to either look around the DB or at template.properties in "Secondary Storage" tmpl directory.

 

As you are doing template clean up, I do want to mention one thing. If I remember correctly, even when a template is "deleted" with the CCP web UI, it isn't actually removed from "Secondary Storage" until all instances that were using it have been destroyed/expunged.

 

If you don't mind a slight delay during the next instance launch, of each template, you could manually remove them from the SR (within XenCenter). CCP should just copy the template again, on next use.

 

Hope this helps.

 

--Mike


Michael Little MEMBERS
コメントアクション パーマリンク
Avatar
Pankaj Paliwal
Avatar

Hi Mike

 

thanks for the response, and the insight into how the templates work (i didnt realise). For now i have left all current templates that show in the SR as "Template XYZ" 0% on disk.

 

I did manage to query the DB and found a few redundant ones that were deleted a long time ago.

 

At the moment i have 2 readings for disk space. For example Primary1 SR shows 1199GB used of 1331.2GB total (1028 Allocated)

 

Now the 1028GB is the sum of all the root and data disks present. So i understand that. The bit i cant figure out is the 1199GB, if you deduct 1028GB that leaves 171GB i cant account for ?

 

Do you think this couyld be templates then even though they dont show anywhere in the Xencenter GUI ?

 

Thanks

 

jon


Matthew Darnell MEMBERS
コメントアクション パーマリンク
Avatar
Pankaj Paliwal
Avatar

Further Update:

 

The SR are LVM over iSCSI. I have tried unsuccessfully to mount them in Xen CLI to view the contents but cant seem to get this to work, possibly as i dont know the vfstype and dont wish to risk any formatting etc

 

I did find that running the lvs command came back with all the logical volumes. From that i used the results - list of VHD files and matched them all off against the MySQL DB, the VHD ID matches the Path field in the Volumes Table. The only entries i could find were for the legit disks that are on the SR.

 

All of the other VHDs i cannot find using the same search paramters. So i have no idea if these are templates, orphaned VHD files ? I suspect these are using the available space but i need a way of determining what they are and then how to get rid of them considering i cant mount the SR

 

Any help appreciated !

 

Thanks


Matthew Darnell MEMBERS
コメントアクション パーマリンク
Avatar
Pankaj Paliwal
Avatar

I would expect that the templates are taking up space, even thought they are showing 0%.  You could check if all the template sizes add up to roughly 171GB.

 

I wouldn't suggest mounting the SR as a filesystem to dom0, without Citrix's help.

 

--Mike


Michael Little MEMBERS
コメントアクション パーマリンク
Avatar
Pankaj Paliwal
Avatar

Sorry to resurrect this one, on the same topic as the original post. The previous answers were correct it semeed in that the random UUIDs were templates

 

however i also have 5 or 6 instances of disks called "Cloud-#############" with the hashes being a UUID

 

These show as full allocation disks i.,e. unlike the templates they dont state 0% on disk

 

Any idea what these are ? They dont seem to correspond to templates or ISO's, they arent data disks from what i can tell, or VM's. I wonder if they are remnants of anything like a template upload or a VM converted to template in CloudStack.

 

Can anyone assist as i would like to delete them to free up space if they arent in use

 

Thanks


Matthew Darnell MEMBERS
コメントアクション パーマリンク
Avatar
Pankaj Paliwal
Avatar

Those VIDs, if old (more than a day or two) would be leftovers from a failed secondary to primary template copy.

 

Should be safe to destroy those VDIs.


Somesh Naidu CITRIX EMPLOYEES
コメントアクション パーマリンク
Avatar
Pankaj Paliwal
Avatar

Thankyou Somesh, i will delete them and cros s my fingers they dont affect anything! Its a nightmare trying to figure out what anything is by resolving UUID's especially when they dont seem to be referenced anywhere

 

Thanks again


Matthew Darnell MEMBERS
コメントアクション パーマリンク

Top Contributors