Commits

Xenith Orb committed 459a6fa

Latest

  • Participants
  • Parent commits 79ab8a3

Comments (0)

Files changed (1)

 	done 
 }
 clone_lvolumes () {
+set -x
 	for lvname in ${vol_name[@]}; do
 		echo -e "Starting clone of: ${lvname}-${SUFFIX}" 
 		# Disable the below line to not run w/ SSH
-		ssh -f root@${REMOTE_HOST} "nc -q 5 -l -p ${PORT} | gzip -cd | dd bs=${BYTE_SIZE} of=/dev/${TARGET_VGNAME}/${lvname}"
-		dd bs=${BYTE_SIZE} if="/dev/${SOURCE_VGNAME}/${lvname}-${SUFFIX}" | gzip -c | nc -q 5 ${REMOTE_HOST} ${PORT} 
+		ssh -f root@${REMOTE_HOST} "nc -l -p ${PORT} | gzip -cd | dd bs=${BYTE_SIZE} of=/dev/${TARGET_VGNAME}/${lvname}"
+		sleep 3
+		dd bs=${BYTE_SIZE} if="/dev/${SOURCE_VGNAME}/${lvname}-${SUFFIX}" | gzip -c | nc ${REMOTE_HOST} ${PORT} 
 	done
 }
 ########### Older function for using with a presetup NBD device