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

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



On 25/02/2024 at 23:55, Matthew Wilcox wrote:

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.

Alternatively, the installer allows to reserve free space in the encrypted
volume group.

That does not accomplish my goal of extending the life of my SSD.  The
SSD will see those blocks as "in use" because they have encrypted data
written to them

Not if you do not write anything to them, or if you TRIM them.

You may either
- tell the installer not to erase (=write) the encrypted partition (if guided partitioning prompts it, not sure)
or
- enable "discard" in /etc/crypttab (should be the default)
- create a logical volume in the free VG space
- blkdiscard the logical volume

(it cannot tell that they are encrypted blocks of zeroes
because, well, they're encrypted).

Irrelevant. Once written, even with plaintext zeroes, a block is considered used until it is TRIMmed.


Reply to: