From: Roman Mamedov <rm@romanrm.net>
To: Linux RAID list <linux-raid@vger.kernel.org>
Subject: LVM on top of mdraid of LVM thin volumes on top of LUKS, aka LUKS+LVM+mdraid Tower of Babel
Date: Sun, 27 Nov 2022 01:24:29 +0500 [thread overview]
Message-ID: <20221127012429.694fe510@nvm> (raw)
Hello,
I am almost half-seriously considering this setup:
Disk 1
=> LUKS encrypted volume 1
==> LVM PV 1
===> LVM thin pool 1
====> LVM thin LV 1
Disk 2
=> LUKS encrypted volume 2
==> LVM PV 2
===> LVM thin pool 2
====> LVM thin LV 2
=====> mdadm RAID1 of LV-1 and LV-2
======> LVM PV
=======> LVM LVs (for individual VMs)
What leads me to this, is:
I want to store VM images, with a requirement that after trimming free space
on those VMs, their free space contains only zeroes, and as such is highly
compressible during backup.
This is apparently not possible directly on top of LUKS, since a trimmed
encrypted disk (with TRIM pass-through) returns random binary garbage in the
trimmed areas, by design of how the encryption works.
So one solution is to use LVM thin instead. A thinned thin LV always returns
zeros in the presently unmapped areas, and that also can be further ensured
with pre-zeroing on allocation (lvchange -Z).
Next, I only want to mirror a part of Disk 1 and Disk 2, not the entire disks.
But the encryption should span them entirely.
And it would be sweet to be able to dynamically resize the mirrored part in
both directions. Mirroring of thin LVs allows for that.
My main concern is will this all bring up itself successfully on boot,
probably it will, or can be made to.
What do you think, is there any other simpler topology that would satisfy all
the requirements?
Thanks
--
With respect,
Roman
reply other threads:[~2022-11-26 20:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221127012429.694fe510@nvm \
--to=rm@romanrm.net \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).