Page 1 of 1

FSTrim/Discard Recommended?

Posted: Fri Jun 23, 2017 4:38 pm
by kbocek
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.

Re: FSTrim/Discard Recommended?

Posted: Fri Jun 23, 2017 5:47 pm
by kbocek
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

Re: FSTrim/Discard Recommended?

Posted: Fri Jun 23, 2017 6:03 pm
by runboy93
There is no TRIM for SD cards.

Re: FSTrim/Discard Recommended?

Posted: Fri Jun 23, 2017 6:09 pm
by kbocek
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.