[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
Marziano
Level 6
Level 6
Posts: 1380
Joined: Thu Jan 04, 2018 1:00 pm

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

Post by Marziano » 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 Marziano on Fri Mar 02, 2018 1:47 pm, edited 2 times in total.
"Those are my principles, and if you don't like them...well, I have others." -Marx...
Groucho { Marx

User avatar
thx-1138
Level 5
Level 5
Posts: 747
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

Marziano
Level 6
Level 6
Posts: 1380
Joined: Thu Jan 04, 2018 1:00 pm

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

Post by Marziano » 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
"Those are my principles, and if you don't like them...well, I have others." -Marx...
Groucho { Marx

Marziano
Level 6
Level 6
Posts: 1380
Joined: Thu Jan 04, 2018 1:00 pm

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

Post by Marziano » 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:
"Those are my principles, and if you don't like them...well, I have others." -Marx...
Groucho { Marx

Post Reply

Return to “Hardware Support”