LVM on top of mdraid of LVM thin volumes on top of LUKS, aka LUKS+LVM+mdraid Tower of Babel

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

 



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



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux