[SOLVED] Is trimming of SSD enabled by default in LM 18.3?

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
User avatar
Sir Charles
Level 7
Level 7
Posts: 1827
Joined: Thu Jan 04, 2018 1:00 pm

[SOLVED] Is trimming of SSD enabled by default in LM 18.3?

Post by Sir Charles » Fri Mar 02, 2018 11:30 am

I just read a couple of (rather old) articles on how to enable trimming for SSD.

(http://ubuntuhandbook.org/index.php/201 ... rformance/
https://www.howtogeek.com/176978/ubuntu ... -yourself/)

Is this something I should do? Or is it already enabled by default in LM 18.3?

Another method I came across suggested to add "discard" to the corresponding line for / in fstab. Something like the following:

UUID=1cd2fc4f-7d99-4c7a-8ea7-6f9a2d5e5960 / ext4 discard,noatime,errors=remount-ro 0 1


Thanks in advance for your inputs!

(edit: correcting typo)
Last edited by Sir Charles on Fri Mar 02, 2018 1:47 pm, edited 2 times in total.
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

User avatar
thx-1138
Level 6
Level 6
Posts: 1290
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: Is trimming of SSD enabled by default in LM 18.3?

Post by thx-1138 » Fri Mar 02, 2018 11:36 am

Yes: /etc/cron.weekly/fstrim

User avatar
Sir Charles
Level 7
Level 7
Posts: 1827
Joined: Thu Jan 04, 2018 1:00 pm

Re: Is trimming of SSD enabled by default in LM 18.3?

Post by Sir Charles » Fri Mar 02, 2018 11:54 am

thx-1138 wrote:
Fri Mar 02, 2018 11:36 am
Yes: /etc/cron.weekly/fstrim
That says it all!
Thank you!

/etc/cron.weekly/fstrim:
#!/bin/sh
# trim all mounted file systems which support it
/sbin/fstrim --all || true
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

User avatar
Sir Charles
Level 7
Level 7
Posts: 1827
Joined: Thu Jan 04, 2018 1:00 pm

Re: Is trimming of SSD enabled by default in LM 18.3?

Post by Sir Charles » Fri Mar 02, 2018 12:15 pm

Sorry for opening yet another thread on the same subject that has been addressed before. I always use to do a search, this time I just forgot to do that. :oops:
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

Post Reply

Return to “Hardware Support”