Re: Set ZFS pool ashift=14 for FreeBSD root pools?
Lionel Cons <[email protected]> Tue, 12 May 2026 18:14:36 +0200
| Newsgroups | gmane.os.freebsd.devel.hackers |
|---|---|
| Message-ID | <CAPJSo4UsgDwB10KhGXyw8gLYgYYLnDBnQq3_P7=DR2xx2Zzfgg@mail.gmail.com> |
On Tue, 12 May 2026 at 18:03, Alan Somers <[email protected]> wrote: > > 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. Is there a way to autodetect VMware, and then use an ashift balue which is double the block size of the parent root device? Because setting the ashift to the block size of a VM disk, which uses the block size of the parent FS, is a pretty bad idea. Lionel