1

My XenServer 6.1 installation reports the following for the local SR:

3711.6 GB used of 3717 GB total (1491 GB allocated)

There are no snapshots visible under the "snapshots" tab of each VM and the host has been rebooted but to no avail. The problem is we cannot create any new VMs because there is no disk space and I'm worried the server will fail any minute due to the lack of disk space, but by rights that shouldn't happen since every VM has an allocated VHD doesn't it?

Any help would be greatly appreciated.

EDIT: I am using PHP Virtual Backup too and there are only 6 VMs and 9 VHDs (that I can see in XenCenter).

Reado
  • 692
  • 2
  • 9
  • 24

2 Answers2

1

Are you using Snapshot-based backup software like PHD Virtual Backup, Alike or bash-scripts? Besides fast clones (as mentioned by Pascal), they can also fill up your storage repo. You can see all VHDs with vhd-util scan -f -m “VHD-*” -l VG_XenStorage-<UUID_of_StorageRepository> -p over XenServer CLI. If you see entries with "parent=VHD-xxxxxxxx-xxxx..." then you have VHDs with dependencies.

Solution: when you move / clone a VM to another LUN, only the last state of the VM will be copied and will therefore take less space there. After a test the original VM can be deleted, so that all dependent VHDs will be gone.

Striker_84
  • 429
  • 2
  • 6
  • Sorry yes, I am using PHD Virtual Backup. I ran that command and got *LOADS* of results that contain the parent VHD value. Ones that have no parent VHD value, are these the primary VHDs that I can see in XenCenter? – Reado Apr 29 '13 at 10:41
  • right, these are the "current" VHDs. Please note that you shouldn't delete the other VHDs with LVM commands (although it's possible). You need them. Please choose one of the largest trees and copy them. Even a full export / re-import of this VM will do, but it will take a lot of time. – Striker_84 Apr 29 '13 at 10:49
  • OK, here's the output from that command: http://static.readescdn.com/vhdlist.txt – Reado Apr 29 '13 at 10:52
  • If I run "lvscan | grep inactive" and then use "lvremove" to delete some of the inactive VHDs, is that OK? Just there are a few "inactive" VHDs in that list which are over 50GB each. – Reado Apr 29 '13 at 10:54
  • NO, please don't. you can make these VHDs inaccessible when you delete parents. do a full copy of the affected VM instead. BTW: the VHD trees are very long. It looks like coalescing of the VHDs doesn't work. Normally this would combine all VHDs parents/childs after the snapshot is deleted. – Striker_84 Apr 29 '13 at 11:18
  • Please also check /var/log/SMlog for the string "E X C E P T I O N“. Before/after this line is a reason why coalescing can't be done. – Striker_84 Apr 29 '13 at 11:29
  • I just need to confirm, if I were to copy the VM from the current local SR to another local SR and back again, would that delete the snapshots? Or not? I don't want to export/import because as you say it'll take a long time and one of the VMs is 1TB in size! Whereas creating a second local SR on our PERC 6/i controller and copying between the two should be nice and quick shouldn't it? – Reado Apr 29 '13 at 12:49
  • Yes, a local copy is much faster than the export/import way. I would start with a smaller VM. Please note that a clone would generate a new mac. "Move VM" won't change the mac address. This won't delete your existing snapshots. It won't takeover them to your new storage, so that your VHD-Tree for this VM is "clean". a manual deletion of your "old" VM is still necessary. – Striker_84 Apr 29 '13 at 13:00
0

Did you use a lot of "storage level fast clone" to create new VMs? The issue with this one is that it uses LVM Snapshots which are dependent on each other but are not visible in your SR.

http://blogs.citrix.com/2012/05/03/creating-vms-from-templates-in-xenserver-creates-a-fast-clone/

Pascal Schmiel
  • 1,728
  • 12
  • 17