Proxmox cluster migrate vm or ct copies the storage twice

xvlvx

Member
Jan 10, 2022
16
0
6
46
Hi All,

I'm migrating my proxmox server to a new bigger server (more storage and compute power).

As a precaution I've setup cluster and added a third 'temporary' server to help migrating if things go south!
The migration was performed from old -> temp -> new, all within the cluster.

When migrating from old -> temp everything went beautiful. No issues (other then some usb-device passthroughs I needed to remove before migrating).

When migrating from temp -> new things didn't went 'wrong', but all storage volumes where copied twice.
See the log output below:

Code:
root@proxmox-temp:~# pct migrate 205 proxmox-new
2022-10-27 08:01:13 starting migration of CT 205 to node 'proxmox-new' (10.x.x.xxx)
2022-10-27 08:01:14 found local volume 'LocalStorage-1:vm-205-disk-0' (in current VM config)
2022-10-27 08:01:14 found local volume 'localstorage1:vm-205-disk-0' (via storage)
2022-10-27 08:01:15   Wiping ext4 signature on /dev/localstorage1/vm-205-disk-0.
2022-10-27 08:01:15   Logical volume "vm-205-disk-0" created.
2022-10-27 08:05:10 131072+0 records in
2022-10-27 08:05:10 131072+0 records out
2022-10-27 08:05:10 8589934592 bytes (8.6 GB, 8.0 GiB) copied, 234.387 s, 36.6 MB/s
2022-10-27 08:05:11 47+499960 records in
2022-10-27 08:05:11 47+499960 records out
2022-10-27 08:05:11 8589934592 bytes (8.6 GB, 8.0 GiB) copied, 235.526 s, 36.5 MB/s
2022-10-27 08:05:11 successfully imported 'localstorage1:vm-205-disk-0'
2022-10-27 08:05:11 volume 'localstorage1:vm-205-disk-0' is 'localstorage1:vm-205-disk-0' on the target
2022-10-27 08:05:13 volume localstorage1/vm-205-disk-0 already exists - importing with a different name
2022-10-27 08:05:13   Wiping ext4 signature on /dev/localstorage1/vm-205-disk-1.
2022-10-27 08:05:13   Logical volume "vm-205-disk-1" created.
2022-10-27 08:09:07 131072+0 records in
2022-10-27 08:09:07 131072+0 records out
2022-10-27 08:09:07 8589934592 bytes (8.6 GB, 8.0 GiB) copied, 234.015 s, 36.7 MB/s
2022-10-27 08:09:09 51+502827 records in
2022-10-27 08:09:09 51+502827 records out
2022-10-27 08:09:09 8589934592 bytes (8.6 GB, 8.0 GiB) copied, 236.196 s, 36.4 MB/s
2022-10-27 08:09:09 successfully imported 'LocalStorage-1:vm-205-disk-1'
2022-10-27 08:09:09 volume 'LocalStorage-1:vm-205-disk-0' is 'LocalStorage-1:vm-205-disk-1' on the target
2022-10-27 08:09:09 # /usr/bin/ssh -e none -o 'BatchMode=yes' -o 'HostKeyAlias=proxmox-new' root@10.x.x.xxx pvesr set-state 205 \''{}'\'
  Logical volume "vm-205-disk-0" successfully removed
2022-10-27 08:09:11 ERROR: removing local copy of 'LocalStorage-1:vm-205-disk-0' failed - can't activate LV 'localstorage1/vm-205-disk-0' to zero-out its data:   Failed to find logical volume "localstorage1/vm-205-disk-0"
2022-10-27 08:09:11 start final cleanup
2022-10-27 08:09:12 ERROR: migration finished with problems (duration 00:07:59)


Did anyone see this behavior before? Does anyone know what is causing it?

I've tried both the web-gui as the cli to perform the migration. Both provided the same results.

Best regards,

LVX
 
it seems you have configured the same storage twice? 'LocalStorage-1' and 'localstorage1'. such a configuration can lead to these problems, best to only configure each storage exactly once
the log shows you :
2022-10-27 08:01:14 found local volume 'LocalStorage-1:vm-205-disk-0' (in current VM config)
2022-10-27 08:01:14 found local volume 'localstorage1:vm-205-disk-0' (via storage)
that it found the 'second' disk image via the storage
(it must always copy *all* related disks, even those not in the config, otherwise it'll be very easy to get stray disk images)
 
Hi dcsapak,

Wow, nicely spotted!!! I didn't see that!
And indeed, after checking the '/etc/pve/storage.cfg' they where both in there, pointing to the same VolumeGroup.

After deleting the duplicate lines everything seems okay now.

Best regards,
LVX
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!