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

Bug#1064624: Hard to short-stroke an encrypted drive



On 27/02/2024 at 08:42, Philip Hands wrote:
Matthew Wilcox <willy@infradead.org> writes:

I want "use largest contiguous space and set up encrypted LVM".
That would let me reserve 200GB of my SSD as unencrypted free space,
which will improve the write endurance of my SSD.

Can one achieve this by telling LVM to allocate less than the full size
of the device to the PV one puts on it?

AFAIK partman does not support it. But guided partitioning allows to reserve some free space in the VG, which achieves the same goal.

If one does that, I would guess that one could later extend the PV to
use more/all of the disk using pvresize, so that those that prefer space
over endurance could make that decission when they are running out of
space.

IMO reserving free space in the VG allows this more easily, as you do not need to resize the PV when you need to use the free space.

But both ways have the same issue with Matthew's use case: when/if partman-auto-crypto erases (=writes with random data) the whole underlying LUKS partition, all its blocks are marked "in use" by the SSD.


Reply to: