I currently have a little SSD (32 GB) for / and another HDD (250 GB) for /home where I use eCryptfs to encrypt my personal files. I consider buying a big SSD (500 GB) to have all the data on a SSD as well. With the Kubuntu installer, I found the “guided with encrypted LVM” pretty satisfying, I am just not sure whether this would enable TRIM on the SSD.

This seems to pose a bit of a risk, but I assume that the performance will turn bad pretty quickly if I do not use TRIM.

  1. Does the installer automatically enable TRIM?
  2. If not, how could I enable it after the installation?

Will “guided with encrypted LVM” enable TRIM on a SSD?

No. Trim is installed by the installer though but the 2 have no correlation. Trim is enabled based on the brand of your SSD. If the SSD is supported and tested prior and deemded working perfectly trim will be enabled. Otherwise it will be installed and disabled and you need to enable it manually. This is independent of the installer.

So one installation might have you a working trim from the start; another installation might have you needing to enable it manually.

If not, how could I enable it after the installation?

From fstrim:

5555            if ! contains "$HDPARM" "Intel" && \
5656               ! contains "$HDPARM" "INTEL" && \
5757               ! contains "$HDPARM" "Samsung" && \
58                ! contains "$HDPARM" "SAMSUNG"; then
59                 echo "device $DEV is not an Intel or Samsung drive"
 58               ! contains "$HDPARM" "SAMSUNG" && \
 59               ! contains "$HDPARM" "OCZ" && \
 60               ! contains "$HDPARM" "SanDisk" && \
 61               ! contains "$HDPARM" "Patriot"; then
 62                echo "device $DEV is not a drive that is known-safe for trimming"
6063                continue
6164            fi
6265        fi

How is Trim enabled?

  • I saw that there is no discard in my /etc/fstab although it is installed on an SSD. mount does not show any discard either. Does that mean the OCZ Nocti does not support TRIM in Ubuntu? – Martin Ueding Oct 7 '14 at 7:21
  • No. discard will give a bad performance hit. See the answer in the link. Ubuntu opted for a weekly cron job. – Rinzwind Oct 7 '14 at 7:23
  • I just finished reading your answer in the link. Makes sense. Since OCZ is not Intel or Samsung, the cron job will probably not do anything, then. Still I think I need to do a bit more to get it through LVM and LUKS by setting the appropriate options in the crypttab, right? – Martin Ueding Oct 7 '14 at 7:26
  • @queueoverflow as of 14.04 OCZ is also automatically going to be enabled. – Rinzwind Oct 7 '14 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.