Mailinglist Archive: opensuse-features (199 mails)

< Previous Next >
[openFATE 321838] Support TRIM/discard mode when installing to SSD
Feature changed by: Martin Pluskal (pluskalm)
Feature #321838, revision 8
Title: Support TRIM/discard mode when installing to SSD

openSUSE Distribution: Rejected by Tomáš Chvátal (scarabeus_iv)
reject reason: See last comment.
Requester: Desirable

Requested by: Peter Simons (psimons)
Partner organization:

While installing Tumbleweed (and Leap 42.2) with an encrypted disk,
there is no way to enable TRIM/discard mode the for the underlying SSD.
I *can* specify the "discard" mount option in the expert partitioner
mode, but I cannot add the necessary "--allow-discards" option to the
call to "cryptsetup" anywhere. Only *after* booting the newly installed
system it's possible to enable that feature, and even then I have to
manually edit /etc/crypttab to do it.

Business case (Partner benefit): TRIM mode allows modern SSDs to operate faster than they
can without it.
There are security implications when combined with LUKS encryption, but
having that ability as an optional feature sure is desirable (and many
other distributions support it, too).

#1: Martin Pluskal (pluskalm) (2017-06-12 17:39:51)
This behaviour is afaik intentional - enabling discard as mount
option/or with luks can lead to premature degradation of many ssd
devices - on other hand fstrim from util linux has service/timer which
will trigger it periodically which is in most cases sufficient and

#2: Peter Simons (psimons) (2017-06-12 19:58:56) (reply to #1)
Actually, it's the other way round. TRIM was invented to *prevent* SSD
degradation and to improve both longevity and performance of SSD
drives, i.e. by combating Write Amplification. has some details.
Running fstrim via cron alleviates these issues to some degree, but
it's certainly not the same thing as using TRIM continuously. It feels
really weird that openSUSE does not take advantage of these features
which have been around (and are standard practice in other
distributions) for several years now.

#3: Martin Pluskal (pluskalm) (2017-06-12 20:25:01) (reply to #2)
Intention and implementation sadly differ - there are plenty of ssd
drives with faulty trim implementations see [1][2] and it is often
recommended against enabling this unless one is sure that his drive is
not among faulty ones.
1. 2.

#4: Peter Simons (psimons) (2017-06-12 22:41:17) (reply to #3)
Yes, I am sure SSDs with broken firmware exist. That is a compelling
reason to not enable TRIM features unconditionally. Instead, users
should have the option to enable use of TRIM if they want to. The
reason I created this FATE entry is because openSUSE's installer does
not allow its users to do that.

+ #5: Martin Pluskal (pluskalm) (2017-06-13 19:10:14) (reply to #4)
+ Afaik potentially dangerous options were intentionally ommited from
+ installer, leaving advanced users with necessity to use other means to
+ achieve what they wanted - but we can of course re-open this fate -
+ maybe it will become more interesting to YaST team in future and they
+ will want to implement this (probably with necessary warning)

openSUSE Feature:

< Previous Next >
This Thread