adventures with snapshots

alexskysilk

Distinguished Member
Oct 16, 2015
1,809
351
153
Chatsworth, CA
www.skysilk.com
I have a new problem (well, it could be old and I just noticed it.) I have a number of containers that show any number of snapshots but when I look at the disk those snapshots dont exist.

Example:
Code:
pvesh get /nodes/sky12/lxc/16980/snapshot
200 OK
[
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2018_01_27_00_00_01",
      "parent" : "auto_snapshot_2018_01_20_00_00_01",
      "snapstate" : "delete",
      "snaptime" : 1517029623
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2018_07_26_08_13_42",
      "parent" : "auto_snapshot_2018_07_20_14_55_10",
      "snaptime" : 1532592848
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2018_02_10_00_00_11",
      "parent" : "auto_snapshot_2018_02_03_00_00_06",
      "snapstate" : "delete",
      "snaptime" : 1518239125
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2018_03_17_00_00_01",
      "parent" : "auto_snapshot_2018_03_10_00_00_01",
      "snapstate" : "delete",
      "snaptime" : 1521245942
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2017_12_23_00_00_02",
      "parent" : "auto_snapshot_2017_12_16_00_00_02",
      "snapstate" : "delete",
      "snaptime" : 1514006884
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2018_03_09_21_00_01",
      "parent" : "auto_snapshot_2018_03_03_00_00_04",
      "snapstate" : "delete",
      "snaptime" : 1520629472
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2018_03_10_00_00_01",
      "parent" : "auto_snapshot_2018_03_09_21_00_01",
      "snapstate" : "delete",
      "snaptime" : 1520640018
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2017_12_16_00_00_02",
      "snapstate" : "delete",
      "snaptime" : 1513400540
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2018_01_20_00_00_01",
      "parent" : "auto_snapshot_2018_01_06_00_00_02",
      "snapstate" : "delete",
      "snaptime" : 1516431237
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2018_08_01_12_21_06",
      "parent" : "auto_snapshot_2018_07_26_08_13_42",
      "snaptime" : 1533126070
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2018_02_17_00_00_03",
      "parent" : "auto_snapshot_2018_02_10_00_00_11",
      "snapstate" : "delete",
      "snaptime" : 1518844143
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2018_03_24_00_00_01",
      "parent" : "vzdump",
      "snaptime" : 1521850162
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2018_02_03_00_00_06",
      "parent" : "auto_snapshot_2018_01_27_00_00_01",
      "snapstate" : "delete",
      "snaptime" : 1517634104
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2018_07_20_14_55_10",
      "parent" : "auto_snapshot_2018_03_24_00_00_01",
      "snaptime" : 1532099217
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2018_03_03_00_00_04",
      "parent" : "auto_snapshot_2018_02_24_00_00_07",
      "snapstate" : "delete",
      "snaptime" : 1520053987
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2018_02_24_00_00_07",
      "parent" : "auto_snapshot_2018_02_17_00_00_03",
      "snapstate" : "delete",
      "snaptime" : 1519448612
   },
   {
      "description" : "vzdump backup snapshot\n",
      "name" : "vzdump",
      "parent" : "auto_snapshot_2018_03_17_00_00_01",
      "snaptime" : 1521743730
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2017_12_30_00_00_05",
      "parent" : "auto_snapshot_2017_12_23_00_00_02",
      "snapstate" : "delete",
      "snaptime" : 1514610085
   },
   {
      "description" : "Automatic snapshot. \n",
      "name" : "auto_snapshot_2018_01_06_00_00_02",
      "parent" : "auto_snapshot_2017_12_30_00_00_05",
      "snapstate" : "delete",
      "snaptime" : 1515215005
   },
   {
      "digest" : "3ff85235f2b4377b0b7009d8d15e960b5d59ccc5",
      "name" : "current",
      "parent" : "auto_snapshot_2018_08_01_12_21_06",
      "running" : 1
   }
]

BUT, here is whats on disk:
Code:
# rbd snap ls rbd3/vm-16980-disk-1
SNAPID NAME                                  SIZE TIMESTAMP
 56020 auto_snapshot_2018_07_20_14_55_10 20480 MB Fri Jul 20 08:06:59 2018
 56166 auto_snapshot_2018_07_26_08_13_42 20480 MB Thu Jul 26 01:14:10 2018
 56867 auto_snapshot_2018_08_01_12_21_06 20480 MB Wed Aug  1 05:21:29 2018

Why are so many snapshots showing in "delete" state, and is that the correct behavior? If so, what about "vzdump" and "auto_snapshot_2018_03_17_00_00_01" which are supposed to exist but dont?

Lastly and most importantly, how do I bring the proxmox snapshots to parity with the on-disk snapshots?
 
Usually the snapshot view diverges when either the snapshots couldn't be deleted (task failed) or they where deleted by hand from the pool.

The snapshots entries reside in the corresponding vmid.conf file, the state 'delete' indicates that the removal didn't finish. If I read the list correctly then the snapshot "auto_snapshot_2017_12_16_00_00_02" is the parent of many, if not all other, snapshot entries.
 
A rescan of snapshots might be worth looking into.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!