在 ubuntu 14.04 上,如何检查 SSD 驱动器是否启用了 TRIM?SSD 驱动器的其他设置值得验证吗?
Rin*_*ind 15
要查看每周 cron 作业的详细信息,请将目录更改为/etc/cron.weekly或包含在命令中,如下所示:
more /etc/cron.weekly/fstrim
Run Code Online (Sandbox Code Playgroud)
您应该会看到一个类似于以下内容的输出:
#!/bin/sh
# trim all mounted file systems which support it
/sbin/fstrim --all || true
Run Code Online (Sandbox Code Playgroud)
如果存在,则修剪处于活动状态/检查并每周执行一次。此命令的帮助将显示...
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
Run Code Online (Sandbox Code Playgroud)
要查看是否支持修剪(如果您有 1 个以上的磁盘,请更改 sda):
sudo hdparm -I /dev/sda | grep "TRIM supported"
Run Code Online (Sandbox Code Playgroud)
它应该显示与此类似的内容:
* Data Set Management TRIM supported (limit 8 blocks)
Run Code Online (Sandbox Code Playgroud)