remove haning snapshots after gnt-backup export
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 21 Dec 2016 16:44:05 +0000 (17:44 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 21 Dec 2016 16:44:05 +0000 (17:44 +0100)
gnt-lv-remove-snap.sh [new file with mode: 0755]

diff --git a/gnt-lv-remove-snap.sh b/gnt-lv-remove-snap.sh
new file mode 100755 (executable)
index 0000000..e364851
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh -xe
+
+dmsetup ls --tree | grep snap-1 | cut -d" " -f1 | xargs -i dmsetup remove {}
+ls /dev/mapper/*snap | xargs -i lvremove -f {}
+