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?
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.