Re: Why OVA size increases after encryption?
Manish Upasani <[email protected]>
| Newsgroups | gmane.linux.kernel.device-mapper.dm-crypt |
|---|---|
| Message-ID | <CAEmnLwW6MRBU=dg=C8hRo6Hwt5+bJPi-7_N4L4RtakEywZ=XYQ@mail.gmail.com> |
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 <[email protected]> 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 [email protected] https://www.saout.de/mailman/listinfo/dm-crypt