destroy snapshots of disks on gnt-instance remove
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 23 Jun 2014 17:39:40 +0000 (19:39 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 23 Jun 2014 17:39:40 +0000 (19:39 +0200)
defaults.sh
parameters.list
remove

index 670d57f..d35032f 100644 (file)
@@ -7,3 +7,6 @@ test -z "$EXTP_ZFS" && EXTP_ZFS=tmp500g/block
 # -b 4k        block size sutable for ext4 filesystem which ganeti uses
 # lz4  compression with low cpu operhead which always helps
 test -z "$EXTP_VOL_PARAM" && EXTP_VOL_PARAM="-s -b 4k -o compression=lz4"
+
+# on zfs destroy remove snapshots of instance disks
+test -z "$EXTP_DESTROY" && EXTP_DESTROY="-r"
index 334acae..7df1b48 100644 (file)
@@ -1,2 +1,3 @@
 zfs    where to create instance zfs volumes
 vol_param      parameters to use for zfs create -V
+destroy                gnt-instance remove also removes snapshots (set empty to disable)
diff --git a/remove b/remove
index ec17ce5..e641286 100755 (executable)
--- a/remove
+++ b/remove
@@ -2,4 +2,4 @@
 
 . /usr/share/ganeti/extstorage/zfs/defaults.sh
 
-zfs destroy $EXTP_ZFS/$VOL_NAME
+zfs destroy $EXTP_DESTROY $EXTP_ZFS/$VOL_NAME