Re: Why OVA size increases after encryption?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you, Milan. I will give it a try and see if that works. 
Best
Manish Upasani



On Tue, Mar 10, 2020 at 1:50 AM Milan Broz <gmazyland@xxxxxxxxx> wrote:
On 10/03/2020 08:36, Ondrej Kozina wrote:
> On 3/9/20 8:16 PM, Manish Upasani wrote:
>>
>> I am comparing the size of OVF after exporting the VM using OVFtool, or
>> others (doesn't make any difference). When I have no encryption, the VM
>> exports with *2.91G size*.
>>
>> If I try to export the same VM after encrypting the disk using dm-crypt,
>> LUKS its sized at *4.34G*.
>
> IIUC those formats are compressed for faster transfer. Encrypted data
> are in practice impossible to compress or to deduplicate. That's why you
> can see the size increase after you introduce encryption in VM.

I think the problem is that you have disabled TRIM for the crypt device,
so the unused block are still allocated.

Usual trick is to enable TRIM for encrypted device and then call
fstrim for the filesystem - OVA image should shrink.

You need to enable it on several places though (VM config and crypttab at least).

Milan
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
https://www.saout.de/mailman/listinfo/dm-crypt

[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux