Sometimes when I can't copy a KVM based VM's raw file ( because of badsectors ) I use the below dd command to copy raw file to new drive and also ignore the bad blocks.
Using the `ls -hs` on original raw file shows a lot less size than the one which is made by dd command,I guess it's because dd will also write zero ( empty spaces of the raw file ) which is unnessary,So anyone familiar with dd and this situation knows how to ask dd not writing zero blocks?
Code:
dd if=/var/lib/vz/images/100/100.raw of=/newdisk/100/100.raw bs=4k conv=noerror,sync