Symptoms
-
Container migration from PVCfL 4.6 to PCS 6.0 fails:
# vzmigrate root@192.168.2.3 -r no -s --keep-dst --convert-vzfs 101:102 -vvvv Actual result that you got : 1416903216: dst: ssh -T -q -c arcfour -o StrictHostKeyChecking=no -o CheckHostIP=no -o UserKnownHostsFile=/dev/null -o PreferredAuthentications=publickey,password,keyboard-interactive root@192.168.2.3 echo $$ /vz/tmp/vzmigrate.BQiJa6/vzmigrate_ssh_pid; /bin/vztar -p -S --same-owner -x -C /vz/tmp/vzmigrate.BQiJa6 1416903216: src: /bin/vztar -c --ignore-failed-read --numeric-owner -f - -C /vz/private/101 .vza 1416903218: 1416899606: wait 'ssh ... /bin/vztar ...' with pid 974576 ... 1416903219: end stage : preMigrateStage 1416903219: The calculated image size is 10485760 blocks 1416903219: 1416899607: Command : mountploop 1416903222: 1416899610: /usr/sbin/vzpkg info .redhat-el5-x86_64 -q jquota 2/dev/null 1416903222: 1416899610: jquota=no ... 1416903222: 1416899610: Mounting CT#102 ... ... 1416903224: 1416899612: Command : copyplooproot 1416903224: dst: ssh -T -q -c arcfour -o StrictHostKeyChecking=no -o CheckHostIP=no -o UserKnownHostsFile=/dev/null -o PreferredAuthentications=publickey,password,keyboard-interactive root@192.168.2.3 echo $$ /vz/tmp/vzmigrate.RhtUMZ/vzmigrate_ssh_pid; /bin/vztar -p -S --same-owner -x -C /vz/tmp/vzmigrate.RhtUMZ 1416903224: src: /bin/vztar -c --ignore-failed-read --numeric-owner -f - -C /vz/tmp/vzmigrate.FyvwFo . 1416907726: ssh exited with code 2 1416907726: Can't move/copy CT#101 - CT#102, [], [] : ssh exited with code 2 1416907726: cleaning : umount tmp dir /vz/tmp/vzmigrate.FyvwFo 1416907726: close channel
-
Non-English locale is configured on the source PVC server.
Cause
Required disk space is not calculated correctly. As a result, ploop of insufficient size is created on the destination server, and migration fails once the ploop is full.
Resolution
Correct the "/usr/bin/vzctcalc
" script the following way:
# diff -u /usr/bin/vzctcalc_orig /usr/bin/vzctcalc
--- /usr/bin/vzctcalc_orig 2013-12-02 12:04:16.000000000 +0100
+++ /usr/bin/vzctcalc 2014-11-26 15:14:59.000000000 +0100
@@ -36,7 +36,7 @@
function estimate_available() {
local available
- available=$(df --total $VE_PRIVATE 2/dev/null | awk '{ if ($1 ~ /total/) print $4 }')
+ available=$(LC_ALL=C df --total $VE_PRIVATE 2/dev/null | awk '{ if ($1 ~ /total/) print $4 }')
[ $? -ne 0 -o -z "$available" ] && return 1
@@ -53,7 +53,7 @@
mount_container
msg $MSG_INFO "Running du"
- dusage=$(du -skc $VE_ROOT --exclude $VE_ROOT/proc --exclude $VE_ROOT/sys | awk '{ if ($2 ~ /total/) print $1 }')
+ dusage=$(LC_ALL=C du -skc $VE_ROOT --exclude $VE_ROOT/proc --exclude $VE_ROOT/sys | awk '{ if ($2 ~ /total/) print $1 }')
[ $? -ne 0 ] && error_msg "Calculation failed" $ERR_UNK
msg $MSG_INFO "Checking for block size"
and re-run the migration.