I have a smaller, LUKS-encrypted ssd. I want to help get longevity if I can. I'm not sure how TRIM comes into play for an encrypted drive. I've looked at this Q&A on TRIM, and my main drive is good.

The drive does not mount on bootup. I normally click the icon in the Other Places tab, enter the password, and mount the drive. I do not want to auto mount the drive on boot. Thank you.

update -- trim is enabled on the primary ssd, with no entry for the other (unmounted) ssd. Can I mount the drive without decrypting, so as to run the trim service? I'm curious about the line with errors=remount-ro o 1 as well.

 ~ systemctl status fstrim.timer
●[solid green] fstrim.timer - Discard unused blocks once a week
   Loaded: loaded (/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled)
   Active: active (waiting) since Sun 2019-04-14 06:03:18 CDT; 14h ago
  Trigger: Mon 2019-04-15 00:00:00 CDT; 3h 38min left
     Docs: man:fstrim

Apr 14 06:03:18 home systemd[1]: Started Discard unused blocks once a week.

 ~ systemctl status fstrim
●[solid white] fstrim.service - Discard unused blocks on filesystems from /etc/fstab
   Loaded: loaded (/lib/systemd/system/fstrim.service; static; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:fstrim(8)

 ~ systemctl cat fstrim
# /lib/systemd/system/fstrim.service
Description=Discard unused blocks on filesystems from /etc/fstab

ExecStart=/sbin/fstrim -Av

 ~ cat /etc/fstab
# /etc/fstab: static file system information.
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=#############-####-####-########### /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0

I'm not sure how TRIM comes into play for an encrypted drive.

Nowhere. TRIM is on the level of the file system. Encryption on the level of the data on the filesystem.

The drive does not mount on bootup.

Also not important

See Is TRIM enabled on my Ubuntu 18.04 installation?

TRIM is enabled to run weekly by default in 18.04. It is a systemd service managed via systemctl.

If not enabled already you need to set it through /etc/fstab options if auto mount. Otherwise you can also use tune2fs to enable it for a manual mount. But it should already be set.

  • Will you look again? I've updated the question. Thank you. – tidelake Apr 15 '19 at 1:35

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.