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

Alan Somers <[email protected]>
Newsgroups gmane.os.freebsd.devel.hackers
Message-ID <CAOtMX2hPR_pm2NiKAJpaDkEQrQTYg_dwpz7xQgaRWW0=q8TYQQ@mail.gmail.com>
On Tue, May 12, 2026 at 9:45 AM Lionel Cons <[email protected]> wrote:
>
> On Tue, 12 May 2026 at 17:36, Alan Somers <[email protected]> wrote:
> >
> > On Tue, May 12, 2026 at 8:46 AM Lionel Cons <[email protected]> wrote:
> > >
> > > On Tue, 12 May 2026 at 12:51, vermaden <[email protected]> wrote:
> > > >
> > > > > How can I set the ZFS pool ashift for root pools
> > > > > to a value like 14 (for FreeBSD inside a VM)?
> > > > >
> > > > > Lionel
> > > >
> > > >
> > > >
> > > > This has to be done before ZFS pool creation and it can be set like that:
> > > >
> > > > # sysctl vfs.zfs.min_auto_ashift=14
> > >
> > > How can I do this at install time for all root pools?
> > >
> > > Lionel
> >
> > I don't know how to do it if you use the vanilla install CD.  Maybe
> > you could boot the install CD, exit to a shell, set the sysctl, and
> > reenter the TUI.
> >
> > But if you have lots of machines to install, you might consider
> > spinning a custom CD, and if you do that then you can easily set the
> > sysctl or set "-o ashift=14" in ZFSBOOT_BOOT_POOL_CREATE_OPTIONS.  See
> > the SCRIPTING section of bsdinstall(8) for details.
>
> Plain ISO image.
>
> During install I get the question for ZFS options, with noatime being
> in the default string (which we remove, because noatime breaks
> software...) ... can I put the option in there?
>
> Lionel

Yes you can.  But if you do that, you should also uncheck "Force 4K
Sectors", because that will set ashift=12.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.