Corsinvest / cv4pve-barc

Backup And Restore Ceph for Proxmox VE
https://www.cv4pve-tools.com
GNU General Public License v3.0
82 stars 22 forks source link

Can't remove container after trying backup #5

Closed ericfri closed 7 years ago

ericfri commented 7 years ago

Hey there,

I decided to try using your backup program, and so far it looks pretty good. I am however having an issue after backing up a couple of containers. I can't delete them from the Proxmox GUI, I get an error that says "rbd snap purge 'vm-100-disk-1' error: Removing all snapshots: 0% complete...failed"

I've tried migrating the container to a different node in the cluster but that didn't help. At this point I'm not sure what else to try.

ericfri commented 7 years ago

I just tried from the command line with:

rbd rm ceph-lxc/vm-101-disk-1

and it returned

2017-03-30 14:45:17.347216 7fa032380d40 -1 librbd: image has snapshots - not removing Removing image: 0% complete...failed. rbd: image has snapshots - these must be deleted with 'rbd snap purge' before the image can be removed.

so I tried

rbd snap purge ceph-lxc/vm-101-disk-1

and it returned

Removing all snapshots: 0% complete...failed. rbd: snapshot 'barccpanel03170330023653' is protected from removal.

ericfri commented 7 years ago

Ok, got it. I had to manually unprotect each snapshot, then I could purge them.

rbd --pool ceph-lxc snap unprotect --image vm-101-disk-1 --snap barcdaily170330030203

franklupo commented 7 years ago

Hi, The creation of snapshots is performed with protected mode, to avoid accidental deletion. Proxmox unprotect only the snapshos he knows.

The idea is to add parameter to specify if snapshot will be created in a protected/unprotected mode.
What do you think about it?

thank you

ericfri commented 7 years ago

I like the idea of protected mode, but if there was a way to disable the protection manually so Proxmox could delete the container would be nice.

So for example, you have protected mode on, do your backups for however long, then say you want to delete the container, have a way to disable the protection on all the snapshots at once, instead of doing them one-by-one.

franklupo commented 7 years ago

Hi, new release 0.1.4.