Move a large disk to another storage

kurdam

Active Member
Sep 29, 2020
44
1
28
33
Hi,



I'm trying to move a VM disk from one SMB share to another. But i have a problem with that, the disk in question is 10TB.

I did my research and tried to move it several times without success. Here is what i did:



Try preallocation off

Try moving it as qcow or raw

Try to shut down the machine then migrate



I have different logs each time


----------------------------------------------------------------

create full clone of drive ide1 (FILERX-SMB:XXX/vm-XXX-disk-0.raw)
Formatting '/mnt/pve/FILERY-SMB/images/XXX/vm-XXX-disk-0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=off compression_type=zlib size=10737418240000 lazy_refcounts=off refcount_bits=16
drive mirror is starting for drive-ide1
drive-ide1: Cancelling block job
interrupted by signal

TASK ERROR: storage migration failed: mirroring error: VM XXX qmp command 'drive-mirror' failed - got timeout
--------------------------------------------------------------------
create full clone of drive ide1 (FILERX-SMB:XXX/vm-XXX-disk-0.raw)
command '/usr/bin/qemu-img info '--output=json' /mnt/pve/FILERX-SMB/images/XXX/vm-XXX-disk-0.raw' failed: got timeout
could not parse qemu-img info command output for '/mnt/pve/FILERX-SMB/images/XXX/vm-XXX-disk-0.raw' - malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/share/perl5/PVE/Storage/Plugin.pm line 954.

Use of uninitialized value $size in division (/) at /usr/share/perl5/PVE/QemuServer.pm line 8148.
qemu-img: Could not open '/mnt/pve/FILERY-SMB/images/XXX/vm-XXX-disk-0.qcow2': Could not open '/mnt/pve/FILERY-SMB/images/XXX/vm-XXX-disk-0.qcow2': No such file or directory
could not parse qemu-img info command output for '/mnt/pve/FILERY-SMB/images/XXX/vm-XXX-disk-0.qcow2' - malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/share/perl5/PVE/Storage/Plugin.pm line 954.

Formatting '/mnt/pve/FILERY-SMB/images/XXX/vm-XXX-disk-0.raw', fmt=raw size=0 preallocation=off
drive mirror is starting for drive-ide1
drive-ide1: Cancelling block job

-------------------------------------------------------------------
create full clone of drive ide1 (FILERX-SMB:XXX/vm-XXX-disk-0.raw)
command '/usr/bin/qemu-img info '--output=json' /mnt/pve/FILERX-SMB/images/XXX/vm-XXX-disk-0.raw' failed: got timeout
could not parse qemu-img info command output for '/mnt/pve/FILERX-SMB/images/XXX/vm-XXX-disk-0.raw' - malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/share/perl5/PVE/Storage/Plugin.pm line 954.

Use of uninitialized value $size in division (/) at /usr/share/perl5/PVE/QemuServer.pm line 8148.
Formatting '/mnt/pve/FILERY-SMB/images/XXX/vm-XXX-disk-1.raw', fmt=raw size=0 preallocation=off
Use of uninitialized value $size in multiplication (*) at /usr/share/perl5/PVE/QemuServer.pm line 7812.
Use of uninitialized value $value in numeric gt (>) at /usr/share/perl5/PVE/Format.pm line 74.
Use of uninitialized value $value in sprintf at /usr/share/perl5/PVE/Format.pm line 79.
transferred 0.0 B of 0.0 B (0.00%)
qemu-img: output file is smaller than input file
TASK ERROR: storage migration failed: copy failed: command '/usr/bin/qemu-img convert -p -n -f raw -O raw /mnt/pve/FILERX-SMB/images/XXX/vm-XXX-disk-0.raw zeroinit:/mnt/pve/FILERY-SMB/images/XXX/vm-XXX-disk-1.raw' failed: exit code 1
---------------------------------------------------------------------

The only one i got kinda close was this one



create full clone of drive ide1 (FILERX-SMB:XXX/vm-XXX-disk-0.raw)
Formatting '/mnt/pve/FILERY-SMB/images/XXX/vm-XXX-disk-0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=off compression_type=zlib size=10737418240000 lazy_refcounts=off refcount_bits=16
transferred 0.0 B of 9.8 TiB (0.00%)
TASK ERROR: storage migration failed: copy failed: command '/usr/bin/qemu-img convert -p -n -f raw -O qcow2 /mnt/pve/FILERX-SMB/images/XXX/vm-XXX-disk-0.raw zeroinit:/mnt/pve/FILERY-SMB/images/XXX/vm-XXX-disk-0.qcow2' failed: interrupted by signal


But after 2 hours at 0% i canceled the job.



--------------------------------------------------------------------------





My idea since this doesn't work is to shut down the VM, migrate the file via FTP from the first server to the second one and then update the VM config file in /etc/pve/nodes/<node_name>/qemu-server/<vm_id> . conf

Can i do it that way ? Do you think that this is a good idea ?

Thank you for your help
 
You can do that, check md5sum after copy to be sure nor errors have occured
 
Thank you for your answer.
Is it just the command "md5sum <namefile.raw>" post migration ?
 
there's two issues at play here:
- your storage is very slow, so even just checking the image size is not possible within a reasonable time
- there's a bug in our error handling when finding out the size fails

the latter should be fixable, filed a bug for it: https://bugzilla.proxmox.com/show_bug.cgi?id=5231
 
Yeah you guessed right, the old storage is too slow. (via FTP the 10TB transfer was estimated in the neighborhood of 36 hours)
This storage being used for our PBS backup repository and i'm trying to move it to a newer more performant server.
What i did to solve this is:
- create a second VMDisk on the new server
- add a new datastore corresponding to it
- move all my backup jobs to go to the new datastore
- created a sync job that will go from the old datastore to the new one.

As I write this message it's going well it will take a few days to upload all the backup to the new server but in the end if it wasn't for this machine being PBS (maybe a VM running a NAS) the ultimate solution is what i was planning to do via FTP VM powered off

I hope it helps someone who is having the same problem as me in the future.
 

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!