Bug 1377355

Summary: RFE: Always enable TRIM on SSDs for newly encrypted disks in installer
Product: [Fedora] Fedora Reporter: Ondrej Kozina <okozina>
Component: python-blivetAssignee: Vratislav Podzimek <vpodzime>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: blivet-maint-list, mbroz, msnitzer, ngalvin, okozina, vpodzime, vtrefny
Target Milestone: ---Keywords: RFE
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-06 11:44:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ondrej Kozina 2016-09-19 13:24:28 UTC
RFE:

Override kernel default for dm-crypt mappings of LUKS1 encrypted volumes via flag put in /etc/crypttab file. This change should affect only newly created encrypted storage based on LUKS1 format during installation. Existing setups should stay intact during distro upgrade or re-installation with existing encrypted storage left intact (no re-format requested)

This flag will activate the dm-crypt mapping with discard enabled.

Reasoning for the change:

User base of Fedora distribution with SSDs grows steadily and while the argument for kernel default setting not to enable the discard is still strong one it doesn't change the fact that vast majority of users (with SSDs) doesn't want to sacrifice better performance of drive with discard/trim enabled for the sake of secrecy.

We're not speaking encrypted data security here and double emphasize on it! Only the fact that blank filesystem on top of dm-crypt device with discard enabled may create well visible patterns in ciphertext device below on SSDs.

For LUKS1 metadata format we don't have a space to store the new default in metadata and therefore we can't flip the default for new LUKS1 devices being formated via libcryptsetup or cryptsetup utility.

Changing the kernel default is of the table due to risk of data corruption with some TrueCrypt configurations involving hidden volumes.

For rotational devices the cost of enabled discard is negligible

Comment 1 Ondrej Kozina 2016-09-20 09:21:21 UTC
Unfortunately it's too late to properly document and communicate the change of default here. Moving to f26 and going to fill proper Change request on fesco

Comment 2 Ondrej Kozina 2017-01-16 14:27:03 UTC
Fedora 26 change proposal: https://fedoraproject.org/wiki/Changes/EnableTrimOnDmCrypt

Comment 4 Ondrej Kozina 2017-02-06 14:52:06 UTC
(hidden comment #3 was unrelated to Fedora distribution therefore I'm removing the need info)