19.5. 启用定期块丢弃
您可以启用 systemd
计时器来定期丢弃所有支持的文件系统上未使用的块。
流程
启用并启动
systemd
计时器:systemctl enable --now fstrim.timer
# systemctl enable --now fstrim.timer Created symlink /etc/systemd/system/timers.target.wants/fstrim.timer
/usr/lib/systemd/system/fstrim.timer. Copy to Clipboard Copied! Toggle word wrap Toggle overflow
验证
验证计时器的状态:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow