Joe
Joe

Reputation: 1044

Is there an equivalent to "fstrim -av" for ZFS on Linux (ZoL)

I'm looking to periodically trim all drives via a script, My servers have a mix of ext4 and zfs.

I currently use fstrim -av for the mounted etx4 volumes but what's the equivalent command for ZoL?

Upvotes: 8

Views: 2448

Answers (1)

Gordan Bobić
Gordan Bobić

Reputation: 1868

Yes there is. As of ZoL 0.8.x, you can do the following:

zpool trim poolname

Or you can:

zpool set autotrim=on poolname

to have it happen as blocks get deallocated.

Upvotes: 11

Related Questions