Merge branch 'master' of https://github.com/ffzg/gnt-info
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 4 Oct 2018 07:19:24 +0000 (09:19 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 4 Oct 2018 07:19:24 +0000 (09:19 +0200)
gnt-instance-fdisk.sh [new file with mode: 0755]

diff --git a/gnt-instance-fdisk.sh b/gnt-instance-fdisk.sh
new file mode 100755 (executable)
index 0000000..5caaaed
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh -xe
+
+instance=$1
+
+gnt-instance info --static $instance > /dev/shm/$instance
+node=`grep 'primary:' /dev/shm/$instance | cut -d: -f2 | tr -d ' '`
+lv=`grep 'logical_id:' /dev/shm/$instance | cut -d: -f2 | tr -d ' '`
+ssh $node fdisk -l /dev/$lv
+