fix VG=volume-group when empty (fallback to ssd)
[gnt-info] / gnt-lv2ssd.sh
index 3985691..b43a5fa 100755 (executable)
@@ -4,6 +4,9 @@ instance=$1
 disk=$2
 target_vg=ssd
 
+# to specify target vg use VG enviroment varible like:
+# VG=oscarvg ./gnt-lv2ssd.sh dataverse 0
+
 if [ "$1" = '-' ] ; then
        read instance disk
 elif [ -z "$instance" -o -z "$disk" ] ; then
@@ -13,6 +16,8 @@ fi
 
 test -z "$instance" && exit 1
 
+test ! -z "$VG" && target_vg=$VG
+
 instance=`gnt-instance list --no-headers -o name $instance | head -1`
 
 node=`gnt-instance list -o pnode --no-headers $instance`