Linux (ZoL) 上的 ZFS 是否有相当于“fstrim -av”的功能

Joe*_*Joe 5 zfs

我希望通过脚本定期修剪所有驱动器,我的服务器混合了 ext4 和 zfs。

我目前对已安装的 etx4 卷使​​用 fstrim -av,但 ZoL 的等效命令是什么?

小智 7

就在这里。从 ZoL 0.8.x 开始,您可以执行以下操作:

zpool trim poolname
Run Code Online (Sandbox Code Playgroud)

或者您可以:

zpool set autotrim=on poolname
Run Code Online (Sandbox Code Playgroud)

当块被释放时发生这种情况。