added VG env to specify target volume group
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 22 Sep 2020 08:23:50 +0000 (10:23 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 22 Sep 2020 08:23:50 +0000 (10:23 +0200)
gnt-lv2ssd.sh

index 3985691..02abf35 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`