Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Sep 2025 00:14:07 +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:  <CAFDf7U%2BbQnOc_xieEi9GSZVtaNmqOhgJsNLzV-m0UtnFsiA%2BcQ@mail.gmail.com>
In-Reply-To: <CAFDf7UL7%2B-erWjmAcRnBM==DUMTt%2BwN=DFM5=u2oigQno3gS_w@mail.gmail.com>
References:  <202509191603.58JG3EF6037438@gitrepo.freebsd.org> <CAFDf7UL7%2B-erWjmAcRnBM==DUMTt%2BwN=DFM5=u2oigQno3gS_w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
(...)

Maybe this need to be fixed somehow because values are different:

% sysctl -a | grep ashift
<118>sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9
<118>sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9
<118>sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9
<118>sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9
<118>sysctl: unknown oid 'vfs.zfs.min_auto_ashift' at line 9
vfs.zfs.vdev.max_auto_ashift: 14
vfs.zfs.vdev.min_auto_ashift: 9
vfs.zfs.vdev.file.physical_ashift: 9
vfs.zfs.vdev.file.logical_ashift: 9

Nuno Teixeira <eduardo@freebsd.org> escreveu (sábado, 20/09/2025 à(s)
23:41):

> 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=0
> vfs.zfs.min_auto_ashift=12
> ```
> 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 à(s) 17:03):
>
>> The branch main has been updated by emaste:
>>
>> URL:
>> https://cgit.FreeBSD.org/src/commit/?id=87a7b35f04b60956e9aa192680ae80773ec38f14
>>
>> 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:=stripe}
>>
>>  #
>> -# Should we use sysctl(8) vfs.zfs.min_auto_ashift=12 to force 4K sectors?
>> +# Should we use sysctl(8) vfs.zfs.vdev.min_auto_ashift=12 to force 4K
>> sectors?
>>  #
>>  : ${ZFSBOOT_FORCE_4K_SECTORS=1}
>>
>> @@ -221,7 +221,7 @@ PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s >> \"%s\""
>>  PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"'
>>  SHELL_TRUNCATE=':> "%s"'
>>  SWAP_GMIRROR_LABEL='gmirror label swap %s'
>> -SYSCTL_ZFS_MIN_ASHIFT_12='sysctl vfs.zfs.min_auto_ashift=12'
>> +SYSCTL_ZFS_MIN_ASHIFT_12='sysctl vfs.zfs.vdev.min_auto_ashift=12'
>>  UMOUNT='umount "%s"'
>>  ZFS_CREATE_WITH_OPTIONS='zfs create %s "%s"'
>>  ZFS_MOUNT='zfs mount "%s"'
>> @@ -255,7 +255,7 @@ msg_encrypt_disks="Encrypt Disks?"
>>  msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions"
>>  msg_error="Error"
>>  msg_force_4k_sectors="Force 4K Sectors?"
>> -msg_force_4k_sectors_help="Align partitions to 4K sector boundries and
>> set vfs.zfs.min_auto_ashift=12"
>> +msg_force_4k_sectors_help="Align partitions to 4K sector boundries and
>> set vfs.zfs.vdev.min_auto_ashift=12"
>>  msg_freebsd_installer="$OSNAME Installer"
>>  msg_geli_password="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="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=12
>> +       # Force 4K sectors using vfs.zfs.vdev.min_auto_ashift=12
>>         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=12' \
>> +                    'vfs.zfs.vdev.min_auto_ashift=12' \
>>                      $BSDINSTALL_TMPETC/sysctl.conf.zfs || return $FAILURE
>>         fi
>>
>>
>>
>
> --
> Nuno Teixeira
> FreeBSD UNIX:  <eduardo@FreeBSD.org>   Web:  https://FreeBSD.org
>


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

[-- Attachment #2 --]
<div dir="ltr"><div>(...)<br><br></div>Maybe this need to be fixed somehow because values are different:<br><br>% sysctl -a | grep ashift<br>&lt;118&gt;sysctl: unknown oid &#39;vfs.zfs.min_auto_ashift&#39; at line 9<br>&lt;118&gt;sysctl: unknown oid &#39;vfs.zfs.min_auto_ashift&#39; at line 9<br>&lt;118&gt;sysctl: unknown oid &#39;vfs.zfs.min_auto_ashift&#39; at line 9<br>&lt;118&gt;sysctl: unknown oid &#39;vfs.zfs.min_auto_ashift&#39; at line 9<br>&lt;118&gt;sysctl: unknown oid &#39;vfs.zfs.min_auto_ashift&#39; at line 9<br>vfs.zfs.vdev.max_auto_ashift: 14<br>vfs.zfs.vdev.min_auto_ashift: 9<br>vfs.zfs.vdev.file.physical_ashift: 9<br>vfs.zfs.vdev.file.logical_ashift: 9</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Nuno Teixeira &lt;<a href="mailto:eduardo@freebsd.org">eduardo@freebsd.org</a>&gt; escreveu (sábado, 20/09/2025 à(s) 23:41):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello!</div><div><br></div><div>I&#39;ve just upgraded 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>#  This file is read when going to multi-user and its contents piped thru<br>#  ``sysctl&#39;&#39; to adjust kernel values.  ``man 5 sysctl.conf&#39;&#39; for details.<br>#<br><br># Uncomment this to prevent users from seeing information about processes that<br># are being run under another UID.<br>#security.bsd.see_other_uids=0<br>vfs.zfs.min_auto_ashift=12<br>```<br></div><div>Do we need to fix it from <span><span><span><span>vfs</span></span></span></span>.<span><span><span><span>zfs</span></span></span></span>.<span><span><span><span>min_auto_ashift -&gt; </span></span></span></span><span><span><span><span>vfs</span></span></span></span>.<span><span><span><span>zfs</span></span></span></span>.vdev.<span><span><span><span>min_auto_ashift on /etc/sysctl.conf?<br><br></span></span></span></span></div><div>Cheers,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Ed Maste &lt;<a href="mailto:emaste@freebsd.org" target="_blank">emaste@freebsd.org</a>&gt; escreveu (sexta, 19/09/2025 à(s) 17:03):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The branch main has been updated by emaste:<br>
<br>
URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=87a7b35f04b60956e9aa192680ae80773ec38f14" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=87a7b35f04b60956e9aa192680ae80773ec38f14</a><br>;
<br>
commit 87a7b35f04b60956e9aa192680ae80773ec38f14<br>
Author:     Siva Mahadevan &lt;<a href="mailto:me@svmhdvn.name" target="_blank">me@svmhdvn.name</a>&gt;<br>
AuthorDate: 2025-07-15 16:45:24 +0000<br>
Commit:     Ed Maste &lt;emaste@FreeBSD.org&gt;<br>
CommitDate: 2025-09-19 16:02:57 +0000<br>
<br>
    bsdinstall: fix vfs.zfs.vdev.min_auto_ashift oid<br>
<br>
    Signed-off-by: Siva Mahadevan &lt;<a href="mailto:me@svmhdvn.name" target="_blank">me@svmhdvn.name</a>&gt;<br>
    PR: 266374<br>
    Pull request: <a href="https://github.com/freebsd/freebsd-src/pull/1851" rel="noreferrer" target="_blank">https://github.com/freebsd/freebsd-src/pull/1851</a><br>;
    Reviewed by: emaste<br>
    Sponsored by: The FreeBSD Foundation<br>
---<br>
 usr.sbin/bsdinstall/scripts/zfsboot | 10 +++++-----<br>
 1 file changed, 5 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/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>
 : ${ZFSBOOT_VDEV_TYPE:=stripe}<br>
<br>
 #<br>
-# Should we use sysctl(8) vfs.zfs.min_auto_ashift=12 to force 4K sectors?<br>
+# Should we use sysctl(8) vfs.zfs.vdev.min_auto_ashift=12 to force 4K sectors?<br>
 #<br>
 : ${ZFSBOOT_FORCE_4K_SECTORS=1}<br>
<br>
@@ -221,7 +221,7 @@ PRINTF_CONF=&quot;printf &#39;%s=\&quot;%%s\&quot;\\\n&#39; %s &gt;&gt; \&quot;%s\&quot;&quot;<br>
 PRINTF_FSTAB=&#39;printf &quot;$FSTAB_FMT&quot; &quot;%s&quot; &quot;%s&quot; &quot;%s&quot; &quot;%s&quot; &quot;%s&quot; &quot;%s&quot; &gt;&gt; &quot;%s&quot;&#39;<br>
 SHELL_TRUNCATE=&#39;:&gt; &quot;%s&quot;&#39;<br>
 SWAP_GMIRROR_LABEL=&#39;gmirror label swap %s&#39;<br>
-SYSCTL_ZFS_MIN_ASHIFT_12=&#39;sysctl vfs.zfs.min_auto_ashift=12&#39;<br>
+SYSCTL_ZFS_MIN_ASHIFT_12=&#39;sysctl vfs.zfs.vdev.min_auto_ashift=12&#39;<br>
 UMOUNT=&#39;umount &quot;%s&quot;&#39;<br>
 ZFS_CREATE_WITH_OPTIONS=&#39;zfs create %s &quot;%s&quot;&#39;<br>
 ZFS_MOUNT=&#39;zfs mount &quot;%s&quot;&#39;<br>
@@ -255,7 +255,7 @@ msg_encrypt_disks=&quot;Encrypt Disks?&quot;<br>
 msg_encrypt_disks_help=&quot;Use geli(8) to encrypt all data partitions&quot;<br>
 msg_error=&quot;Error&quot;<br>
 msg_force_4k_sectors=&quot;Force 4K Sectors?&quot;<br>
-msg_force_4k_sectors_help=&quot;Align partitions to 4K sector boundries and set vfs.zfs.min_auto_ashift=12&quot;<br>
+msg_force_4k_sectors_help=&quot;Align partitions to 4K sector boundries and set vfs.zfs.vdev.min_auto_ashift=12&quot;<br>
 msg_freebsd_installer=&quot;$OSNAME Installer&quot;<br>
 msg_geli_password=&quot;Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted&quot;<br>
 msg_geli_setup=&quot;Initializing encryption on selected disks,\n this will take several seconds per disk&quot;<br>
@@ -1099,7 +1099,7 @@ zfs_create_boot()<br>
        #<br>
        f_dprintf &quot;$funcname: Preparing disk partitions for ZFS pool...&quot;<br>
<br>
-       # Force 4K sectors using vfs.zfs.min_auto_ashift=12<br>
+       # Force 4K sectors using vfs.zfs.vdev.min_auto_ashift=12<br>
        if [ &quot;$ZFSBOOT_FORCE_4K_SECTORS&quot; ]; then<br>
                f_dprintf &quot;$funcname: With 4K sectors...&quot;<br>
                f_eval_catch $funcname sysctl &quot;$SYSCTL_ZFS_MIN_ASHIFT_12&quot; \<br>
@@ -1382,7 +1382,7 @@ zfs_create_boot()<br>
<br>
        if [ &quot;$ZFSBOOT_FORCE_4K_SECTORS&quot; ]; then<br>
                f_eval_catch $funcname echo &quot;$ECHO_APPEND&quot; \<br>
-                    &#39;vfs.zfs.min_auto_ashift=12&#39; \<br>
+                    &#39;vfs.zfs.vdev.min_auto_ashift=12&#39; \<br>
                     $BSDINSTALL_TMPETC/sysctl.conf.zfs || return $FAILURE<br>
        fi<br>
<br>
<br>
</blockquote></div><div><br clear="all"></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><font color="#888888">Nuno Teixeira</font></div><div><div><font color="#888888">
FreeBSD UNIX:  &lt;eduardo@FreeBSD.org&gt;   Web:  <a href="https://FreeBSD.org" rel="noreferrer" target="_blank">https://FreeBSD.org</a><br></font></div></div></div></div>;
</blockquote></div><div><br clear="all"></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><font color="#888888">Nuno Teixeira</font></div><div><div><font color="#888888">
FreeBSD UNIX:  &lt;eduardo@FreeBSD.org&gt;   Web:  <a href="https://FreeBSD.org" rel="noreferrer" target="_blank">https://FreeBSD.org</a><br></font></div></div></div></div>;

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7U%2BbQnOc_xieEi9GSZVtaNmqOhgJsNLzV-m0UtnFsiA%2BcQ>