Holes prevent TRIM
Exactly what this ZoL bug states: https://github.com/openzfs/zfs/pull/10227
Added and later removed an SLOG.
Now I can't trim that pool anymore, but get the error message
"cannot remove hole: no such device in pool"
because ZFS apparently stumbles over the removed log device.
ZoL has a solution (linked above); the same could apply to illumos-ZFS.
Updated by Nick Ewins 3 days ago
Tested to generate the error by creating a zpool and associated SLOG. Removing the SLOG and performing zpool trim <pool> generated the error as expected.
After the modification, further testing was performed. From there, removal of the SLOG and a zpool trim <pool> is completed successfully. The error message is no longer present.