Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Sep 2025 23:41:46 +0100
From:      Nuno Teixeira <eduardo@freebsd.org>
To:        Ed Maste <emaste@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org,  dev-commits-src-main@freebsd.org
Subject:   Re: git: 87a7b35f04b6 - main - bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid
Message-ID:  <CAFDf7UL7%2B-erWjmAcRnBM==DUMTt%2BwN=DFM5=u2oigQno3gS_w@mail.gmail.com>
In-Reply-To: <202509191603.58JG3EF6037438@gitrepo.freebsd.org>
References:  <202509191603.58JG3EF6037438@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000003046b1063f434bf4
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hello!

I've just upgraded to a recent main and on boot i see:

`sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9`

I remember this line in /etc/sysctl.conf for years:

```
#
#  This file is read when going to multi-user and its contents piped thru
#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.
#

# Uncomment this to prevent users from seeing information about processes
that
# are being run under another UID.
#security.bsd.see_other_uids=3D0
vfs.zfs.min_auto_ashift=3D12
```
Do we need to fix it from vfs.zfs.min_auto_ashift ->
vfs.zfs.vdev.min_auto_ashift
on /etc/sysctl.conf?

Cheers,

Ed Maste <emaste@freebsd.org> escreveu (sexta, 19/09/2025 =C3=A0(s) 17:03):

> The branch main has been updated by emaste:
>
> URL:
> https://cgit.FreeBSD.org/src/commit/?id=3D87a7b35f04b60956e9aa192680ae807=
73ec38f14
>
> commit 87a7b35f04b60956e9aa192680ae80773ec38f14
> Author:     Siva Mahadevan <me@svmhdvn.name>
> AuthorDate: 2025-07-15 16:45:24 +0000
> Commit:     Ed Maste <emaste@FreeBSD.org>
> CommitDate: 2025-09-19 16:02:57 +0000
>
>     bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid
>
>     Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
>     PR: 266374
>     Pull request: https://github.com/freebsd/freebsd-src/pull/1851
>     Reviewed by: emaste
>     Sponsored by: The FreeBSD Foundation
> ---
>  usr.sbin/bsdinstall/scripts/zfsboot | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/usr.sbin/bsdinstall/scripts/zfsboot
> b/usr.sbin/bsdinstall/scripts/zfsboot
> index aa05faa7d3dd..5fbf56ea59ac 100755
> --- a/usr.sbin/bsdinstall/scripts/zfsboot
> +++ b/usr.sbin/bsdinstall/scripts/zfsboot
> @@ -69,7 +69,7 @@ f_include $BSDCFG_SHARE/variable.subr
>  : ${ZFSBOOT_VDEV_TYPE:=3Dstripe}
>
>  #
> -# Should we use sysctl(8) vfs.zfs.min_auto_ashift=3D12 to force 4K secto=
rs?
> +# Should we use sysctl(8) vfs.zfs.vdev.min_auto_ashift=3D12 to force 4K
> sectors?
>  #
>  : ${ZFSBOOT_FORCE_4K_SECTORS=3D1}
>
> @@ -221,7 +221,7 @@ PRINTF_CONF=3D"printf '%s=3D\"%%s\"\\\n' %s >> \"%s\"=
"
>  PRINTF_FSTAB=3D'printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s=
"'
>  SHELL_TRUNCATE=3D':> "%s"'
>  SWAP_GMIRROR_LABEL=3D'gmirror label swap %s'
> -SYSCTL_ZFS_MIN_ASHIFT_12=3D'sysctl vfs.zfs.min_auto_ashift=3D12'
> +SYSCTL_ZFS_MIN_ASHIFT_12=3D'sysctl vfs.zfs.vdev.min_auto_ashift=3D12'
>  UMOUNT=3D'umount "%s"'
>  ZFS_CREATE_WITH_OPTIONS=3D'zfs create %s "%s"'
>  ZFS_MOUNT=3D'zfs mount "%s"'
> @@ -255,7 +255,7 @@ msg_encrypt_disks=3D"Encrypt Disks?"
>  msg_encrypt_disks_help=3D"Use geli(8) to encrypt all data partitions"
>  msg_error=3D"Error"
>  msg_force_4k_sectors=3D"Force 4K Sectors?"
> -msg_force_4k_sectors_help=3D"Align partitions to 4K sector boundries and
> set vfs.zfs.min_auto_ashift=3D12"
> +msg_force_4k_sectors_help=3D"Align partitions to 4K sector boundries and
> set vfs.zfs.vdev.min_auto_ashift=3D12"
>  msg_freebsd_installer=3D"$OSNAME Installer"
>  msg_geli_password=3D"Enter a strong passphrase, used to protect your
> encryption keys. You will be required to enter this passphrase each time
> the system is booted"
>  msg_geli_setup=3D"Initializing encryption on selected disks,\n this will
> take several seconds per disk"
> @@ -1099,7 +1099,7 @@ zfs_create_boot()
>         #
>         f_dprintf "$funcname: Preparing disk partitions for ZFS pool..."
>
> -       # Force 4K sectors using vfs.zfs.min_auto_ashift=3D12
> +       # Force 4K sectors using vfs.zfs.vdev.min_auto_ashift=3D12
>         if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then
>                 f_dprintf "$funcname: With 4K sectors..."
>                 f_eval_catch $funcname sysctl "$SYSCTL_ZFS_MIN_ASHIFT_12"=
 \
> @@ -1382,7 +1382,7 @@ zfs_create_boot()
>
>         if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then
>                 f_eval_catch $funcname echo "$ECHO_APPEND" \
> -                    'vfs.zfs.min_auto_ashift=3D12' \
> +                    'vfs.zfs.vdev.min_auto_ashift=3D12' \
>                      $BSDINSTALL_TMPETC/sysctl.conf.zfs || return $FAILUR=
E
>         fi
>
>
>

--=20
Nuno Teixeira
FreeBSD UNIX:  <eduardo@FreeBSD.org>   Web:  https://FreeBSD.org

--0000000000003046b1063f434bf4
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hello!</div><div><br></div><div>I&#39;ve just upgrade=
d to a recent main and on boot i see:<br><br>`sysctl: unknown oid &#39;vfs.=
zfs.min_auto_ashift&#39; at line 9`<br><br></div><div>I remember this line =
in /etc/sysctl.conf for years:<br><br>```</div><div>#<br># =C2=A0This file =
is read when going to multi-user and its contents piped thru<br># =C2=A0``s=
ysctl&#39;&#39; to adjust kernel values. =C2=A0``man 5 sysctl.conf&#39;&#39=
; for details.<br>#<br><br># Uncomment this to prevent users from seeing in=
formation about processes that<br># are being run under another UID.<br>#se=
curity.bsd.see_other_uids=3D0<br>vfs.zfs.min_auto_ashift=3D12<br>```<br></d=
iv><div>Do we need to fix it from=C2=A0<span class=3D"gmail-il"><span class=
=3D"gmail-il"><span class=3D"gmail-il"><span class=3D"gmail-il">vfs</span><=
/span></span></span>.<span class=3D"gmail-il"><span class=3D"gmail-il"><spa=
n class=3D"gmail-il"><span class=3D"gmail-il">zfs</span></span></span></spa=
n>.<span class=3D"gmail-il"><span class=3D"gmail-il"><span class=3D"gmail-i=
l"><span class=3D"gmail-il">min_auto_ashift -&gt;=C2=A0</span></span></span=
></span><span class=3D"gmail-il"><span class=3D"gmail-il"><span class=3D"gm=
ail-il"><span class=3D"gmail-il">vfs</span></span></span></span>.<span clas=
s=3D"gmail-il"><span class=3D"gmail-il"><span class=3D"gmail-il"><span clas=
s=3D"gmail-il">zfs</span></span></span></span>.vdev.<span class=3D"gmail-il=
"><span class=3D"gmail-il"><span class=3D"gmail-il"><span class=3D"gmail-il=
">min_auto_ashift on /etc/sysctl.conf?<br><br></span></span></span></span><=
/div><div>Cheers,</div></div><br><div class=3D"gmail_quote gmail_quote_cont=
ainer"><div dir=3D"ltr" class=3D"gmail_attr">Ed Maste &lt;<a href=3D"mailto=
:emaste@freebsd.org">emaste@freebsd.org</a>&gt; escreveu (sexta, 19/09/2025=
 =C3=A0(s) 17:03):<br></div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1e=
x">The branch main has been updated by emaste:<br>
<br>
URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D87a7b35f04b60956e=
9aa192680ae80773ec38f14" rel=3D"noreferrer" target=3D"_blank">https://cgit.=
FreeBSD.org/src/commit/?id=3D87a7b35f04b60956e9aa192680ae80773ec38f14</a><b=
r>
<br>
commit 87a7b35f04b60956e9aa192680ae80773ec38f14<br>
Author:=C2=A0 =C2=A0 =C2=A0Siva Mahadevan &lt;<a href=3D"mailto:me@svmhdvn.=
name" target=3D"_blank">me@svmhdvn.name</a>&gt;<br>
AuthorDate: 2025-07-15 16:45:24 +0000<br>
Commit:=C2=A0 =C2=A0 =C2=A0Ed Maste &lt;emaste@FreeBSD.org&gt;<br>
CommitDate: 2025-09-19 16:02:57 +0000<br>
<br>
=C2=A0 =C2=A0 bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid<br>
<br>
=C2=A0 =C2=A0 Signed-off-by: Siva Mahadevan &lt;<a href=3D"mailto:me@svmhdv=
n.name" target=3D"_blank">me@svmhdvn.name</a>&gt;<br>
=C2=A0 =C2=A0 PR: 266374<br>
=C2=A0 =C2=A0 Pull request: <a href=3D"https://github.com/freebsd/freebsd-s=
rc/pull/1851" rel=3D"noreferrer" target=3D"_blank">https://github.com/freeb=
sd/freebsd-src/pull/1851</a><br>
=C2=A0 =C2=A0 Reviewed by: emaste<br>
=C2=A0 =C2=A0 Sponsored by: The FreeBSD Foundation<br>
---<br>
=C2=A0usr.sbin/bsdinstall/scripts/zfsboot | 10 +++++-----<br>
=C2=A01 file changed, 5 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scri=
pts/zfsboot<br>
index aa05faa7d3dd..5fbf56ea59ac 100755<br>
--- a/usr.sbin/bsdinstall/scripts/zfsboot<br>
+++ b/usr.sbin/bsdinstall/scripts/zfsboot<br>
@@ -69,7 +69,7 @@ f_include $BSDCFG_SHARE/variable.subr<br>
=C2=A0: ${ZFSBOOT_VDEV_TYPE:=3Dstripe}<br>
<br>
=C2=A0#<br>
-# Should we use sysctl(8) vfs.zfs.min_auto_ashift=3D12 to force 4K sectors=
?<br>
+# Should we use sysctl(8) vfs.zfs.vdev.min_auto_ashift=3D12 to force 4K se=
ctors?<br>
=C2=A0#<br>
=C2=A0: ${ZFSBOOT_FORCE_4K_SECTORS=3D1}<br>
<br>
@@ -221,7 +221,7 @@ PRINTF_CONF=3D&quot;printf &#39;%s=3D\&quot;%%s\&quot;\=
\\n&#39; %s &gt;&gt; \&quot;%s\&quot;&quot;<br>
=C2=A0PRINTF_FSTAB=3D&#39;printf &quot;$FSTAB_FMT&quot; &quot;%s&quot; &quo=
t;%s&quot; &quot;%s&quot; &quot;%s&quot; &quot;%s&quot; &quot;%s&quot; &gt;=
&gt; &quot;%s&quot;&#39;<br>
=C2=A0SHELL_TRUNCATE=3D&#39;:&gt; &quot;%s&quot;&#39;<br>
=C2=A0SWAP_GMIRROR_LABEL=3D&#39;gmirror label swap %s&#39;<br>
-SYSCTL_ZFS_MIN_ASHIFT_12=3D&#39;sysctl vfs.zfs.min_auto_ashift=3D12&#39;<b=
r>
+SYSCTL_ZFS_MIN_ASHIFT_12=3D&#39;sysctl vfs.zfs.vdev.min_auto_ashift=3D12&#=
39;<br>
=C2=A0UMOUNT=3D&#39;umount &quot;%s&quot;&#39;<br>
=C2=A0ZFS_CREATE_WITH_OPTIONS=3D&#39;zfs create %s &quot;%s&quot;&#39;<br>
=C2=A0ZFS_MOUNT=3D&#39;zfs mount &quot;%s&quot;&#39;<br>
@@ -255,7 +255,7 @@ msg_encrypt_disks=3D&quot;Encrypt Disks?&quot;<br>
=C2=A0msg_encrypt_disks_help=3D&quot;Use geli(8) to encrypt all data partit=
ions&quot;<br>
=C2=A0msg_error=3D&quot;Error&quot;<br>
=C2=A0msg_force_4k_sectors=3D&quot;Force 4K Sectors?&quot;<br>
-msg_force_4k_sectors_help=3D&quot;Align partitions to 4K sector boundries =
and set vfs.zfs.min_auto_ashift=3D12&quot;<br>
+msg_force_4k_sectors_help=3D&quot;Align partitions to 4K sector boundries =
and set vfs.zfs.vdev.min_auto_ashift=3D12&quot;<br>
=C2=A0msg_freebsd_installer=3D&quot;$OSNAME Installer&quot;<br>
=C2=A0msg_geli_password=3D&quot;Enter a strong passphrase, used to protect =
your encryption keys. You will be required to enter this passphrase each ti=
me the system is booted&quot;<br>
=C2=A0msg_geli_setup=3D&quot;Initializing encryption on selected disks,\n t=
his will take several seconds per disk&quot;<br>
@@ -1099,7 +1099,7 @@ zfs_create_boot()<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 #<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 f_dprintf &quot;$funcname: Preparing disk parti=
tions for ZFS pool...&quot;<br>
<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0# Force 4K sectors using vfs.zfs.min_auto_ashif=
t=3D12<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0# Force 4K sectors using vfs.zfs.vdev.min_auto_=
ashift=3D12<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if [ &quot;$ZFSBOOT_FORCE_4K_SECTORS&quot; ]; t=
hen<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f_dprintf &quot;$fu=
ncname: With 4K sectors...&quot;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f_eval_catch $funcn=
ame sysctl &quot;$SYSCTL_ZFS_MIN_ASHIFT_12&quot; \<br>
@@ -1382,7 +1382,7 @@ zfs_create_boot()<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if [ &quot;$ZFSBOOT_FORCE_4K_SECTORS&quot; ]; t=
hen<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f_eval_catch $funcn=
ame echo &quot;$ECHO_APPEND&quot; \<br>
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &#39=
;vfs.zfs.min_auto_ashift=3D12&#39; \<br>
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &#39=
;vfs.zfs.vdev.min_auto_ashift=3D12&#39; \<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0$BSDINSTALL_TMPETC/sysctl.conf.zfs || return $FAILURE<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 fi<br>
<br>
<br>
</blockquote></div><div><br clear=3D"all"></div><br><span class=3D"gmail_si=
gnature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature"><d=
iv dir=3D"ltr"><div><font color=3D"#888888">Nuno Teixeira</font></div><div>=
<div><font color=3D"#888888">
FreeBSD UNIX:=C2=A0 &lt;eduardo@FreeBSD.org&gt;=C2=A0 =C2=A0Web:=C2=A0 <a h=
ref=3D"https://FreeBSD.org" rel=3D"noreferrer" target=3D"_blank">https://Fr=
eeBSD.org</a><br></font></div></div></div></div>

--0000000000003046b1063f434bf4--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7UL7%2B-erWjmAcRnBM==DUMTt%2BwN=DFM5=u2oigQno3gS_w>