Re: Set ZFS pool ashift=14 for FreeBSD root pools?

vermaden <[email protected]> Wed, 13 May 2026 13:21:57 +0200
Newsgroups gmane.os.freebsd.devel.hackers
Message-ID <jswgcaqzqmzwlmxiapvn@bmme>
> Try `zpool get ashift `, but all my pools show 0 (zero)
> 
> ashift=ashift
>    Pool sector size exponent, to the power of 2 (internally referred
>    to as ashift).  Values from 9 to 16, inclusive, are valid; also,
>    the value 0 (the default) means to auto-detect using the kernel's
>    block layer and a ZFS internal exception list.
> 
> Miroslav Lachman




If you create ZFS pool by hand with 'ashift' option specified:

    # zpool create -o ashift=14 pool device

Then 'ashift' is then properly reported by zpool-get(8) cmd:

    # zpool get ashift zroot
    NAME   PROPERTY  VALUE   SOURCE
    zroot  ashift    14      local

Same with ZFS pools where '-o ashift=14' is specified in
the 'ZFS Pool Options' in bsdinstall(8) installer.

    # zpool get ashift zroot
    NAME   PROPERTY  VALUE   SOURCE
    zroot  ashift    14      local

... but if You just set this that way:
    vfs.zfs.min_auto_ashift: 14
    vfs.zfs.vdev.min_auto_ashift: 14

... and create ZFS pool like that:

    # zpool create pool device

You will get '0' as answer zpool-get(8) command:

    # zpool get ashift zroot
    NAME   PROPERTY  VALUE   SOURCE
    zroot  ashift    0       default

BUG submitted here:
- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295261

Regards,
vermaden