Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Oct 2023 07:17:57 -0700
From:      Alan Somers <asomers@freebsd.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: zpool geli encryption question
Message-ID:  <CAOtMX2jAs9%2BM79N-4LC9EdZ3y4jbvhWEWCs9KFxL9r=6zt%2BwZw@mail.gmail.com>
In-Reply-To: <ZSvrhL3IV4642-n5@int21h>
References:  <ZSvrhL3IV4642-n5@int21h>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 15, 2023 at 6:39=E2=80=AFAM void <void@f-m.fm> wrote:
>
> A machine periodically backs up bhyve volume-backed VMs like so:
>
> # zfs send ssdzfs/fbsd140R | gzip -c > /vol-backups/$(date '+%G.%m.%d_%H:=
%M').fbsd140R.gz
>
> This vm is zfs internally with geli encryption of both the fs and swap.
>
> The same backup routine applies to an openbsd vm. It has its own way of
> filesystem encryption.
>
> Both volumes are 64GB in size. On the host, both volumes use lz4.
>
> Surprisingly (to me at least), the freebsd backup results in a smaller
> size of archive. The openbsd one results in a slightly larger archive tha=
n
> its source.
>
> I'm expecting both archives to be slightly larger than their sources,
> because encrypted data is uncompressible.
>
> The freebsd archive is 19GB. The openbsd one is 65GB. Why is this?

How much of the FreeBSD VM's disk is actually in-use?  Maybe you are
using TRIM with FreeBSD, which punches holes in the host's ZFS
storage.  That would explain why compression seems to save space, even
though the data is encrypted.
-Alan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2jAs9%2BM79N-4LC9EdZ3y4jbvhWEWCs9KFxL9r=6zt%2BwZw>