[SOLVED] lvm-thin zeroing and VM restore

Andrew Kobelkov

Active Member
Dec 14, 2017
7
0
41
53
Some times ago, I turn off lvm-thin zeroing by
Code:
lvchange -Zn vg/pool-name
Yesterday, I backup Windows 7 VM and try to restore it. And this VM can not boot!
After several hours of investigation, I found out that the reason was a turning off a lvm-thin zeroing.
Is this normal behavior?
 
lvm-thin zeroing does the following:
when writing a new pe, it get zeroed out and then the write happens

but the restore code skips large blocks of zeroes, because it assumes the target storage is zeroed out
so if you have a backup with a large block of zeroes and deactivated lvm-thin zeroing, at the position where there should be a large number of zeroes, there is the data of the disk that was there before