MSata drive for APU2C4 board and Trim support
-
Hi there I recently stumbled on these two:
https://forum.netgate.com/topic/101673/new-sg-4860-w-msata-ssd-trim-not-enabled-on-factory-install/6
https://forum.netgate.com/topic/70908/msata-drive-for-alix-apu-board-and-trim-support/4
I saw that trim is not enabled, with:
tunefs -p /
output:
tunefs: POSIX.1e ACLs: (-a) disabled tunefs: NFSv4 ACLs: (-N) disabled tunefs: MAC multilabel: (-l) disabled tunefs: soft updates: (-n) enabled tunefs: soft update journaling: (-j) enabled tunefs: gjournal: (-J) disabled tunefs: trim: (-t) disabled tunefs: maximum blocks per file in a cylinder group: (-e) 4096 tunefs: average file size: (-f) 16384 tunefs: average number of files in a directory: (-s) 64 tunefs: minimum percentage of free space: (-m) 8% tunefs: space to hold for metadata blocks: (-k) 6408 tunefs: optimization preference: (-o) time tunefs: volume label: (-L)
I thought about enableling TRIM, but I am not sure if it is supported, is there anyway to be sure? I looked at the console at boot and saw:
Trying to mount root from ufs:/dev/gptid/091891e1-98b3-11e8-9310-000db9426810 [rw]... Configuring crash dumps... Using /dev/gptid/091c6914-98b3-11e8-9310-000db9426810 for dump device. /dev/gptid/091891e1-98b3-11e8-9310-000db9426810: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/gptid/091891e1-98b3-11e8-9310-000db9426810: clean, 3010054 free (3358 frags, 375837 blocks, 0.1% fragmentation) Filesystems are clean, continuing... Mounting filesystems...
is this needed or does a simple
/sbin/tunefs -t enable /
Suffice?
-
I wouldn't expect it to be a problem. If you enable it and it isn't supported there will be a log line reporting that at boot.
We don't enable it by default because some devices do react badly but they are not common AFAIK.
Steve
-
@Stephenw10 thanks for your advise and yes I understand why you are not enabling it by default, just one thing before I try, from what I read there are a few ways described
to set trim, all use the single user mode boot, but they use different approaches to enable trim:method 1
/sbin/tunefs -t enable /dev/ufsid/55bdd213616a70a3
https://forum.netgate.com/topic/87458/2-2-4-and-how-i-enabled-trim
method 2
"tunefs -t enable /"
Which one would you advise?
-
Hmm, if root is mounted then both should refer the same thing. Except you have to use
/dev/gptid/091c6914-98b3-11e8-9310-000db9426810
.It's been a while since I played around with this. I was never convinced it makes much difference to be honest.
Try it and see.
Steve
-
@stephenw10 reporting back, I don't really know what it brings, but TRIM is enabled, Thanks! Or is there anyway to test it's use?
tunefs: POSIX.1e ACLs: (-a) disabled tunefs: NFSv4 ACLs: (-N) disabled tunefs: MAC multilabel: (-l) disabled tunefs: soft updates: (-n) enabled tunefs: soft update journaling: (-j) enabled tunefs: gjournal: (-J) disabled tunefs: trim: (-t) enabled tunefs: maximum blocks per file in a cylinder group: (-e) 4096 tunefs: average file size: (-f) 16384 tunefs: average number of files in a directory: (-s) 64 tunefs: minimum percentage of free space: (-m) 8% tunefs: space to hold for metadata blocks: (-k) 6408 tunefs: optimization preference: (-o) time tunefs: volume label: (-L)
-
Not that I'm aware of. If shows enabled there it should be doing it's thing.
Steve