ZFS does not have a huge problem with fragmentation. However, over time and especially when the ZFS filesystem gets over 70% full, fragmentation occurs.
The FRAG
column of a zpool list
command shows how fragmented the free space is.
There is no 'defragging tool' for ZFS.
The easiest and most sure way to defragment a ZFS pool is to use zfs send
and zfs recv
to copy the data out of the fragmented pool and into a new, unfragmented pool. This is not unlike other filesystems.
https://pthree.org/2012/12/20/zfs-administration-part-xiii-sending-and-receiving-filesystems/
http://docs.oracle.com/cd/E19253-01/819-5461/gbchx/index.html