Commits

Xenith Orb  committed e6eb1b8

More foolishness

  • Participants
  • Parent commits dbe86ad

Comments (0)

Files changed (1)

 	done
 }
 create_remote_lvolumes () {
-	#vgscan ## just in case : not needed for remote w/ ssh
-	local count=0
-	for lvname in ${vol_name[@]}; do 
-		ssh root@${REMOTE_HOST} "lvcreate -L \"${vol_size[$count]}G\" -n ${lvname} ${TARGET_VGNAME}"
-		count=$(($count+1))
-	done 
+	ssh root@${REMOTE_HOST} <<-_HERE
+	set -x;
+	remote_vol_name=( ${vol_name[@]} );
+	remote_vol_size=( ${vol_size[@]} );
+	REMOTE_TARGET_VGNAME=$TARGET_VGNAME;
+	remote_count=0;
+	for remote_lvname in ${remote_vol_name[@]}; do lvcreate -L ${remote_vol_size[$count]}G -n ${remote_lvname} ${REMOTE_TARGET_VGNAME}; remote_count=$(($remote_count+1)); done"
+	_HERE 
 }
+
 clone_lvolumes () {
 	for lvname in ${vol_name[@]}; do
 		echo -e "Starting clone of: ${lvname}-${SUFFIX}"