mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-5446:
delete all the leftover snapshots on primary storage in case of snapshot errors, after a new backup snapshot is finished
This commit is contained in:
parent
e32eec8b3e
commit
0e3aebbb9d
@ -152,7 +152,8 @@ destroy_snapshot() {
|
|||||||
fi
|
fi
|
||||||
lvm lvremove -f "${vg}/${snapshotname}-cow"
|
lvm lvremove -f "${vg}/${snapshotname}-cow"
|
||||||
elif [ -f $disk ]; then
|
elif [ -f $disk ]; then
|
||||||
$qemu_img snapshot -d "$snapshotname" $disk
|
#delete all the existing snapshots
|
||||||
|
$qemu_img snapshot -l $disk |tail -n +3|awk '{print $1}'|xargs -I {} $qemu_img snapshot -d {} $disk >&2
|
||||||
if [ $? -gt 0 ]
|
if [ $? -gt 0 ]
|
||||||
then
|
then
|
||||||
failed=2
|
failed=2
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user