I'll preface this with: someone who actually wrote the code may come back
and say I'm completely wrong, but based on my experience/recollection:

What you are attempting to use has not been around for a decade.  All of
the original TRIM implementations were a system-wide setting, not a zpool
setting and it was enabled by default, only acting on SSDs.  As far as I
know it would only TRIM on device addition/pool creation or remove/delete,
not during normal operations:
https://github.com/openzfs/zfs/pull/924
https://svnweb.freebsd.org/base?view=revision&revision=252162

zpool autotrim (on an active pool) is relatively new (2019) and a per-pool
setting, not a vdev setting, just like the zpool initialize code it's
based on.  It will ignore HDDs.
https://github.com/openzfs/zfs/commit/1b939560be5c51deecf875af9dada9d094633bf7

I doubt anyone is planning to make it a per-vdev setting but I'll let the
folks writing the code answer that definitively.

Thanks,
--Tim

On Wed, Apr 28, 2021 at 9:12 AM Kent Watsen <[email protected]> wrote:

> [CC-ing Illumos-zfs, as I just got added.  For those new to this thread,
> please see this permalink:
> https://illumos.topicbox.com/groups/discuss/T6ef0a71646a80e63-Mff037ef74dc10571c74cdd7e
> ]
>
>
> Thank you all that have responded thus far!
>
> I’m surprised my top-line question isn't answered yet, given that having
> an SSD-based ZIL/SLOG for a spinning rust based pool must be very common
> and well known…like, from a decade ago ;)
>
> Here's the questions again:
>
> 1) assuming "autotrim=on" should be set for the SSD-based “log” vdev, and
> yet makes no sense for HDD (spinning rust) based pool, is it expected to
> set the “autotrim” property for the whole-pool (assuming it’s ignored by
> the the HDDs that don’t support TRIM) or for just the “log” vdev?
>
> 2) assuming it’s best to set "autotrim=on” for just the “log” vdev, why is
> the command shown in the permalink above failing?
>
>
> Thanks,
> Kent
>
> ------------------------------------------
> illumos: illumos-zfs
> Permalink:
> https://illumos.topicbox.com/groups/zfs/T6ef0a71646a80e63-Mad79a9db736819f810c3facd
> Delivery options: https://illumos.topicbox.com/groups/zfs/subscription
>

------------------------------------------
illumos: illumos-discuss
Permalink: 
https://illumos.topicbox.com/groups/discuss/T6ef0a71646a80e63-M67a7dac3587841f3f61d8ce4
Delivery options: https://illumos.topicbox.com/groups/discuss/subscription

Reply via email to