Re: Set ZFS pool ashift=14 for FreeBSD root pools?
Miroslav Lachman <[email protected]> Tue, 12 May 2026 18:56:09 +0200
| Newsgroups | gmane.os.freebsd.devel.hackers |
|---|---|
| Message-ID | <[email protected]> |
On 12/05/2026 18:14, Lionel Cons wrote: > On Tue, 12 May 2026 at 18:03, Alan Somers <[email protected]> wrote: [..] >> 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. You can check `kenv` variables # kenv | grep system smbios.system.maker="VMware, Inc." smbios.system.product="VMware Virtual Platform" smbios.system.serial="VMware-42 xx xx xx xx xx xx xx" smbios.system.uuid="42xxxxxxxxxxxxxx" smbios.system.version="None" But detection of the block size depends on the device VMware emulates. Most of the time it can be seen in `diskinfo -v` output (sectorsize or stripesize), but many times it shows 512 even if underlying storage has much bigger blocks. Then you need to find other commands for specific disk / storage type. For example NVME disks can use `nvmecontrol identify`. Don't know much about VMware emulated disks. All I have access is SCSI type da0 etc. Miroslav Lachman