kbocek
Posts: 8
Joined: Fri Jun 23, 2017 4:27 pm

FSTrim/Discard Recommended?

Fri Jun 23, 2017 4:38 pm

I have a Raspian based distro (FreePBX) and am wondering if running fstrim and mounting the filesystem with discard is recommended? I see the SSD documentation:

https://wiki.debian.org/SSDOptimization

But I am unsure how this applies to Micro-SD cards.

Thanks.

kbocek
Posts: 8
Joined: Fri Jun 23, 2017 4:27 pm

Re: FSTrim/Discard Recommended?

Fri Jun 23, 2017 5:47 pm

A bit more research on SSDs. So basically you do *not* mount with discard and instead occasionally run fstrim via the timer:

Code: Select all

/usr/share/doc/util-linux/examples/fstrim.service
/usr/share/doc/util-linux/examples/fstrim.timer

runboy93
Posts: 352
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland
Contact: Website

Re: FSTrim/Discard Recommended?

Fri Jun 23, 2017 6:03 pm

There is no TRIM for SD cards.

kbocek
Posts: 8
Joined: Fri Jun 23, 2017 4:27 pm

Re: FSTrim/Discard Recommended?

Fri Jun 23, 2017 6:09 pm

A posting says the the lsblk -D command tells you if trim is supported:

Code: Select all

$ lsblk -D
NAME        DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
mmcblk0            0        4M     976M         1
|-mmcblk0p2  3145728        4M     976M         1
`-mmcblk0p1  3145728        4M     976M         1
This seems to say it *is* supported.

Return to “Raspberry Pi OS”