在Ubuntu 14.04上,如何检查TRIM是否已打开SSD驱动器


9

在Ubuntu 14.04上,如何检查TRIM是否已打开SSD驱动器?其他设置值得验证SSD驱动器吗?

Answers:


15

要查看您的每周cron作业的详细信息,请将目录更改为/etc/cron.weekly或将其包含在命令中,如下所示:

more /etc/cron.weekly/fstrim 

您应该看到如下所示的输出:

#!/bin/sh
# trim all mounted file systems which support it
/sbin/fstrim --all || true

如果存在,则修剪被激活/检查并每周执行一次。此命令的帮助将向您显示...

fstrim --help

Usage:
 fstrim [options] <mount point>

Options:
 -a, --all           trim all mounted filesystems that are supported
 -o, --offset <num>  the offset in bytes to start discarding from
 -l, --length <num>  the number of bytes to discard
 -m, --minimum <num> the minimum extent length to discard
 -v, --verbose       print number of discarded bytes

 -h, --help     display this help and exit
 -V, --version  output version information and exit

要查看是否支持修剪(如果有多个磁盘,请更改sda):

sudo hdparm -I /dev/sda | grep "TRIM supported"

并且应该显示类似以下内容:

*   Data Set Management TRIM supported (limit 8 blocks)

1
FWIW,它的工作方式也如Ubuntu 15.04所示。
约翰·T

我在某处读到,只有Samsung和Intel SSD支持此修整选项?这是真的?
Ljiljan Veselinovic

@LjiljanVeselinovic至少那些。但是其他人也是如此。我的OCZ也很好用,例如
Rinzwind '16

我买了Trascent 370S。支持修剪。Ubuntu 16.04是否会定期执行此工作?
Ljiljan Veselinovic

是,每周一次(请参阅cron.weekly;))
Rinzwind '16
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.