Article ID: 120483, created on Mar 10, 2014, last review on May 4, 2014

  • Applies to:
  • Virtuozzo 6.0

Symptoms

Ploop snapshot cannot be deleted with the following error message:

~# prlctl snapshot-delete 333 -i 57ff7d22-ddce-4fd6-a8db-976094de6e55
Delete the snapshot...
Failed to delete snapshot: Operation failed. Failed to delete snapshot: Single delta, nothing to merge [38]
Failed to delete snapshot {57ff7d22-ddce-4fd6-a8db-976094de6e55}

Cause

The snapshot deletion process has been interrupted and DiskDescriptor.xml was not modified to reflect the changes.

Resolution

  1. Confirm that only one delta is used:

    ~# grep 333 /sys/block/ploop*/pdelta/*/image
    /sys/block/ploop26196/pdelta/0/image:/vz/private/333/root.hdd/root.hds
    
  2. Check that the snapshot file is not held by any process:

    ~# ll /vz/private/333/root.hdd/
    total 32879644
    drwx------  4 root root        4096 Feb 11  2013 cache-private
    drwxr-xr-x  2 root root        4096 Feb 11  2013 cache-root
    -rw-r--r--  1 root root        1134 Mar  1 20:00 DiskDescriptor.xml
    -rw-------  1 root root           0 Feb 11  2013 DiskDescriptor.xml.lck
    -rw-------  1 root root 21077426176 Mar  5 02:49 root.hds
    -rw-------  1 root root 12487491584 Mar  4 19:21 root.hds.{230c98c4-bdbb-4c0d-ad29-5269cce7366b}
    drwx------  2 root root        4096 Apr 29  2013 root.hds.mnt
    drwxr-xr-x 21 root root        4096 Apr 29  2013 templates
    ~# lsof 2>/dev/null | grep 230c98c4-bdbb-4c0d-ad29-5269cce7366b
    ~#
    

    (In the example above you can also notice that modification date for root.hds file is more recent then for root.hds.{230c98c4-bdbb-4c0d-ad29-5269cce7366b})

  3. Stop the affected container.
  4. Create a backup copy of the directory /vz/private/CTID/root.hdd.
  5. Modify <Storage> and <Snapshots> sections in /vz/private/CTID/root.hdd/DiskDescriptor.xml to exclude the snapshot. <Storage> and <Snapshots> sections in DiskDescriptor.xml of the container withiout any snapshots looks this way:

     <StorageData>
        <Storage>
          <Start>0</Start>
          <End>20971520</End>
          <Blocksize>2048</Blocksize>
          <Image>
            <GUID>{5fbaabe3-6958-40ff-92a7-860e329aab41}</GUID>
            <Type>Compressed</Type>
            <File>root.hds</File>
          </Image>
        </Storage>
      </StorageData>
      <Snapshots>
        <TopGUID>{5fbaabe3-6958-40ff-92a7-860e329aab41}</TopGUID>
        <Shot>
          <GUID>{5fbaabe3-6958-40ff-92a7-860e329aab41}</GUID>
          <ParentGUID>{00000000-0000-0000-0000-000000000000}</ParentGUID>
        </Shot>
      </Snapshots>
    
  6. Delete the /vz/private/CTID/Snapshots.xml file.
  7. Start the container.
  8. Delete the unnecessary snapshot image (/vz/private/333/root.hdd/root.hds.{230c98c4-bdbb-4c0d-ad29-5269cce7366b}).

Search Words

Single delta

Single delta, nothing to merge

Single delta, nothing to merge [38]

c62e8726973f80975db0531f1ed5c6a2 2897d76d56d2010f4e3a28f864d69223 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF