remove snapshots on all nodes in cluster
[gnt-info] / gnt-lv-remove-snap.sh
1 #!/bin/sh -e
2
3 if [ "$1" = "run" ] ; then
4
5 dmsetup ls --tree | grep snap-1 | cut -d" " -f1 | xargs -i dmsetup remove {}
6 ls /dev/mapper/*snap | xargs -i lvremove -f {}
7
8 else
9
10 cp $0 /dev/shm/snap-remove.sh
11 gnt-cluster copyfile /dev/shm/snap-remove.sh
12 gnt-cluster command -M sh -e /dev/shm/snap-remove.sh run
13
14 fi