Article ID: 118238, created on Oct 28, 2013, last review on Oct 7, 2015

  • Applies to:
  • Virtuozzo


When I list the files inside a ploop container's hard drive directory (/vz/private/CT_ID/root.hdd/), there are several ".hds" files that indicate the container has one or more snapshots:

~# du -csh /vz/private/101/root.hdd/*
4.0K    /vz/private/101/root.hdd/DiskDescriptor.xml
0       /vz/private/101/root.hdd/DiskDescriptor.xml.lck
577G    /vz/private/101/root.hdd/root.hds
147G    /vz/private/101/root.hdd/root.hds.{c6fd60f3-6da5-47a8-975a-0e14b06d95ad}
44K     /vz/private/101/root.hdd/templates
724G    total

However, the snapshots of this container cannot be listed:

~# prlctl snapshot-list 101

As a result, it is not possible to delete the snapshots using the command prlctl snapshot-delete.

How do I delete these snapshots?


The fact that a snapshot is not listed is the result of an empty dump folder inside the container's private area.

Below is an example of usual snapshot creation:

~# prlctl snapshot 101
The snapshot with ID {08ddd014-7d57-4b19-9a82-15940f38e7f0} has been successfully created.

A newly created snapshot is saved to the /vz/private/<CT_ID>/dump/<snapshot_ID> file, where <CT_ID> is the Container ID and <snapshot_ID> is a snapshot ID.

In the above example, the snapshot with the ID {08ddd014-7d57-4b19-9a82-15940f38e7f0} is saved to the file /vz/private/101/dump/{08ddd014-7d57-4b19-9a82-15940f38e7f0}.

~# ls /vz/private/101/dump

Snapshot IDs are required to list, switch to, and delete snapshots.

As a result, if the /vz/private/<CT_ID>/dump folder is empty for some reason, you will not be able to list the snapshots of this container.

~# ll /vz/private/101/dump/
total 0


Solution 1

In order to get rid of these unlisted snapshots, use the prl_disk_tool utility (which works with the "hdd" file directly). prl_disk_tool should be executed on a stopped container.

IMPORTANT: Before deleting a snapshot, please, make sure you have enough free space on the host (this should be greater than the total size of all snapshots). If you do not, the operation will not be completed and this may lead to container corruption.

~# prl_disk_tool merge --hdd /vz/private/101/root.hdd
merge snapshot {5fbaabe3-6958-40ff-92a7-860e329aab41} -> {4ab2f4c8-e459-4355-ab76-e5a69b9f7efb}
Opening delta /vz/private/101/root.hdd/root.hds.{d29fd925-9dc3-4abd-8cb2-53d0a17ccace}
Opening delta /vz/private/101/root.hdd/root.hds
Storing /vz/private/101/root.hdd/DiskDescriptor.xml
Removing /vz/private/101/root.hdd/root.hds.{d29fd925-9dc3-4abd-8cb2-53d0a17ccace}
ploop snapshot {5fbaabe3-6958-40ff-92a7-860e329aab41} has been successfully merged

(prl_disk_tool is not selective by design - it will delete all snapshots of the specified container.)

Solution 2

As an alternative solution, a backup and restore of the container can be used for the same purpose.

The backup operation creates an archive of the current container data and does not include snapshots. Therefore, after restoration, the resulting container will not have any snapshots.

~# prlctl stop 101
~# prlctl backup 101
~# prlctl restore 101

Search Words

prlctl disk tool compact interrupt

merge failed backups

ploop snapshot

Unable to delete snapshot

disk usage snapshoots

empty snapshot-list

Failed to delete snapshot: Operation failed. Failed to delete snapshot: Can't find snapshot by uuid

vzctl snapshot-delete is not merging snapsho

ploop merge

error in ploop_merge_snapshot_by_guid Inconsistensy detected

prl_disk_tool does not merge


deleting snapshot not possible

Error in get_delta_info (merge.c:244): Single delta, nothing to merge


delete snapshot

Can't find snapshot by uuid

snapshot files not found

prl_disk_tool merge --hdd does not merge snapshots

root.hds too large

multiple root.hds images for CT

2897d76d56d2010f4e3a28f864d69223 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF