I wouldn't really classify this as a "bug", but really an improvement to the bsdinstall "experimental" zfs on root feature => sane defaults. If you choose "4K Sectors" during a zfs-on-root install in 10.2 RELEASE bsdinstall correctly sets vfs.zfs.min_auto_ashift=12 and creates the initial zroot pool vdev using 4K minimum sector size. In my case this was a 2-disk mirror. Further vdevs which are created, in my case with this command, adding a second mirror to the zroot pool: zpool add zroot mirror ada2 ada3 This results in the following sector sizes: root@zfsroot:~ # zdb -l /dev/ada0p3 | grep ashift ashift: 12 root@zfsroot:~ # zdb -l /dev/ada1p3 | grep ashift ashift: 12 root@zfsroot:~ # zdb -l /dev/ada2 | grep ashift ashift: 9 root@zfsroot:~ # zdb -l /dev/ada3 | grep ashift ashift: 9 ie, fine (following the installer option) on initial vdev, and back to the OS default for the next vdev. Knowing this I could easily set the sysctl before adding the mirror. My humble suggestion is that this might be a nice-to-have "sane default" set by bsdinstall. Given the sysadmin has chosen 4K sectors for the initial it is "reasonable" (?) to assume that this is a modern'ish machine and 4K sectors are better for the hardware or desired for other reasons. Further, future vdevs created are probably subject to the same context. Could bsdinstall just add the sysctl setting for 4K settings to /boot/loader.conf if that option is chose during install? After the initial reboot, the sysadmin would then naturally create vdevs of the same sector size as chosen at bootup or can change the setting back to 512b (ashift=9). It might be worth communicating this loader.conf adjustment to the sysadmin at an appropriate point.
thanks for picking this up. I actually played around with setting vfs.zfs.min_auto_ashift=12 in /boot/loader.conf but couldn't get it to "stick". ie syctl vfs.zfs.min_auto_ashift still reported 9 after reboot. Not sure why that would be?
It is a sysctl, not a loader tunable. It also depends on the ZFS module being loaded, because the sysctl exists
this was fixed in r319863