zfs on 4k sector disks

mailinglists mailinglists at debank.tv
Sun Feb 21 01:58:25 UTC 2010


On 21/02/10 1:25 AM, Dimitry Andric wrote:
> On 2010-02-20 10:47, mailinglists wrote:
>> This "Advanced Format" basically means the sectors size on disk is
>> changed to 4k in stead of 512k.
>
> Please note those disks still seem to expose 512B sectors to any OS; the
> 4kiB sectors are only used internally.  And there seems to be no jumper
> to "fix" this behaviour...  Unaligned writes can cause multiple
> read-write-modify operations, which are most likely bad for performance.
>
>
>> I'm wondering if freeBSD 8.0 using ZFS raidz and drives like these will
>> work properly, I've seen a lot of articles and postings about partitions
>> not being properly aligned with the physical disk layout and suffering
>> big performance hits. My question is; should I worry about these issues
>> or does ZFS already align the data on a 4k border?
>
> You can at least try to make sure your partitions are aligned to 4kiB.
> This should be easy enough to do with e.g. gpart(8).  I see no specific
> alignment options in the zpool(1M) or zfs(1M) manpages, but there may
> be some trick that I am not aware of. :)
>
> With UFS, you might want to experiment with block and fragment sizes, to
> see what is most optimal.  For example, a block size of 32kiB and
> fragment size of 4kiB, on a partition aligned to 4kiB.
Dimitry,

Thank you for your answer,

I won't be bitten by this with the UFS partitions as they reside on a 
smaller disk with 512b sectors (although I did notice sysinstall still 
starts at sector 63 when creating ufs partitions which wouldn't work 
well with the 4k drives).

I should probably have been more clear in explaining what I want to achieve

setup:
FreeBSD 8.0-Stable (RELENG_8) csupped 2 and updated 19 feb 2010.
Core2 quad, 4GB mem
OS Drive: 500 GB SATA using UFS (defaults from sysinstall)
DATA: 3 * 1.5TB ZFS

I'd like to setup the ZFS as a raidz using the whole disk, for this to 
work properly though I guess ZFS should align the start of the FS on a 
4k border, I could as a fallback create the ZFS on partitions which 
start at the right spot but I'd rather stick with the "default" of using 
the whole drive.

Does anybody know how ZFS aligns the FS on disk?

Thanks,
Rob Evers


***deze e-mail is gescand door Onlinespamfilter.nl***


More information about the freebsd-fs mailing list