Solved gnop create -S 4096 # no longer required?

In prepping for a dual-boot FreeBSD / Debian on ZFS, I was going through my old notes on manual ZFS configuration. Back then, sometime around 2014 and FreeBSD 9, many of the scripts used something along the lines of
Code:
gnop create -S 4096 <disk_id>
before creating the pool itself. (I'll not link them here, as they are likely outdated in more ways than one.)

I didn't see that in scripts in /usr/libexec/bsdinstall on FreeBSD 11.1-RELEASE or on the current wiki pages.

Is this "align to 4k" step (as I recall) no longer necessary with FreeBSD?
 
gnop isn't needed, but you do probably want to set vfs.zfs.min_auto_ashift=12. The gnop bit was needed before FreeBSD 10.1, whereas now vfs.zfs.min_auto_ashift manages the alignment. It defaults to 9 (which means 512 byte alignment), and zpool create will try to detect the correct sector size, but if the drive lies (as they often do), you could end up with 512 byte alignment when it should really be 4096. Setting it to 12 forces 4096 byte alignment.

https://www.freebsd.org/doc/handbook/zfs-advanced.html

You can see what you actually ended up with on a pool by running zdb and grepping for ashift.
 
Back
Top