4e8de9ad561b343dd4dbe7827603e68188bf99cb
LVMPlugin->volume_import (used by storage_migrate on either offline migration with local disks, or online migration with storage-only referenced disks) passed 'conv=sparse' to `dd`. This can lead to data-corruption, if the target volume is not zero-initialized. dropping the sparse argument completely would fix the problem, but breaks keeping data sparse for LvmThinPlugin. This patch moves the dd out into (LVM*) plugin specific sub so that each can control the parameters. Steps for reproducing the issue: * create a cluster with (at least) 2 nodes A and B, with a free disk-device (/dev/sdx) * write a recognizable pattern to /dev/sdx on B: `dd if=/dev/zero bs=10M | tr '\000' '\255' | dd of=/dev/sdb bs=10M` (would be grateful for alternatives to the dd| tr| dd) * on both A and B create a lvm-vg (pvcreate, vgcreate) * add it as _not_ shared storage, which is available on nodes A and B * create a small guest on A * fill a file in the guest with zeros `dd if=/dev/zero of=/zerofil bs=10M` * stop the guest, migrate it to B * start the guest - check that the file `/zerofil` contains `ad` instead of `00` Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Description
with PMEM support!
Languages
Perl
99.3%
Makefile
0.6%