4.2. 设置定期 TRIM 操作
您可以在系统上启用调度的修剪操作。
先决条件
- 您的系统中有 LVM-VDO 卷。
流程
启用并启动计时器:
systemctl enable --now fstrim.timer
# systemctl enable --now fstrim.timer
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
验证
验证计时器是否已启用:
systemctl list-timers fstrim.timer
# systemctl list-timers fstrim.timer NEXT LEFT LAST PASSED UNIT ACTIVATES Mon 2021-05-10 00:00:00 EDT 5 days left n/a n/a fstrim.timer fstrim.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
注意
您将看不到对 VDO 卷的任何引用,因为 fstrim.timer
在所有挂载的文件系统上运行。