我的/etc/cron.daily/fstrim看起来是这样的:
#!/bin/sh
# call fstrim-all to trim all mounted file systems which support it
set -e
# This only runs on Intel and Samsung SSDs by default, as some SSDs with faulty
# firmware may encounter data loss problems when running fstrim under high I/O
# load (e. g. https://launchpad.net/bugs/1259829). You can append the
# --no-model-check option here to disable the vendor check and run fstrim on
# all SSD drives.
exec fstrim-all --no-model-check然而,修剪并不是每天都发生的。我对此进行了测试,通过微调,然后编写~30 48并删除它,等待24+时间(实际上是48小时,几乎不用计算机),然后再用fstrim -v /进行微调。在64 on的磁盘上裁剪了45 on。
怎么啦?手动修整似乎是可行的,只有cronjob不起作用。驱动器是三星830。
发布于 2015-12-27 15:49:29
fstrim可能会修剪所有空闲空间,而不管它是否已经被修剪。这是文件系统的决定。因此,除非您对文件系统的特性非常确定,否则,只要fstrim报告的值不超过空闲空间,就不是错误的指示。
至于测试某物是否已被修剪,您可以尝试:https://unix.stackexchange.com/a/85880/30851
https://unix.stackexchange.com/questions/251774
复制相似问题