ZFS and Samsung Spinpoint F4 4K sector drive

Adam Nowacki nowak at xpam.de
Fri Oct 8 02:21:09 UTC 2010


Nothing user friendly but if you're willing to modify sources and 
rebuild kernel there is a one line tweak.
/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c find:
*ashift = highbit(MAX(pp->sectorsize, SPA_MINBLOCKSIZE)) - 1;
and modify to something like:
*ashift = highbit(MAX(MAX(4096, pp->sectorsize), SPA_MINBLOCKSIZE)) - 1;
I'm using this for 3 months with 20 2TB 4kb sector WDC disks (in 2 
raidz2 arrays of 10) without any issues. Writes go at 300MB/s.

Gary Corcoran wrote:
> I've tried to read up on the issue of using ZFS with 4K sector drives,
> but haven't seen any definitive answers with regards to FreeBSD.
> The Samsung Spinpoint F4 is their latest 2TB drive, which has 4K sectors
> and "emulation", and no info on whether the emulation can be disabled.
> But it is on sale for the next few days, and the price is very tempting.
> 
> So I would like to ask: Can these 4K drives, emulating 512 byte sectors,
> be successfully used with ZFS raidz via _some_ tweak, without getting a 
> major
> slowdown?  That is, is there some sysctl, some option to zpool create, or
> anything else, that can cause a zpool which uses whole disks, to be aligned
> to 4K sectors in FreeBSD?
> 
> Thanks,
> Gary
> _______________________________________________
> 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"
> 
> 



More information about the freebsd-fs mailing list