Make ZFS use the physical sector size when computing initial ashift

Justin T. Gibbs gibbs at FreeBSD.org
Wed Jul 10 17:38:58 UTC 2013


On Jul 10, 2013, at 11:21 AM, Xin Li <delphij at delphij.net> wrote:

> Signed PGP part
> On 07/10/13 02:02, Dag-Erling Sm￸rgrav wrote:
> > The attached patch causes ZFS to base the minimum transfer size for
> > a new vdev on the GEOM provider's stripesize (physical sector size)
> > rather than sectorsize (logical sector size), provided that
> > stripesize is a power of two larger than sectorsize and smaller
> > than or equal to VDEV_PAD_SIZE.  This should eliminate the need for
> > ivoras@'s gnop trick when creating ZFS pools on Advanced Format
> > drives.
> 
> I think there are multiple versions of this (I also have one[1]) but
> the concern is that if one creates a pool with ashift=9, and now
> ashift=12, the pool gets unimportable.  So there need a way to disable
> this behavior.
> 
> Another thing (not really related to the automatic detection) is that
> we need a way to manually override this setting from command line when
> creating the pool, this is under active discussion at Illumos mailing
> list right now.
> 
> [1]
> https://github.com/trueos/trueos/commit/3d2e3a38faad8df4acf442b055c5e98ab873fb26
> 
> Cheers,
> - -- 
> Xin LI <delphij at delphij.net>    https://www.delphij.net/
> FreeBSD - The Power to Serve!           Live free or die
> 
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"

I'm sure lots of folks have "some solution" to this.  Here is an
old version of what we use at Spectra:

	http://people.freebsd.org/~gibbs/zfs_patches/zfs_auto_ashift.diff

The above patch is missing some cleanup that was motivated by my
discussions with George Wilson about this change in April.  I'll
dig that up later tonight.  Even if you don't read the full diff,
please read the included checkin comment since it explains the
motivation behind this particular solution.

This is on my list of things to upstream in the next week or so after
I add logic to the userspace tools to report whether or not the
TLVs in a pool are using an optimal allocation size.  This is only
possible if you actually make ZFS fully aware of logical, physical,
and the configured allocation size.  All of the other patches I've seen
just treat physical as logical.

--
Justin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20130710/cf251ead/attachment.sig>


More information about the freebsd-hackers mailing list