ZFS Striping and Optimizing Capabilities

Daniel Staal DStaal at usa.net
Mon Apr 11 14:47:39 UTC 2011


On Sun, April 10, 2011 2:32 am, Dan Nelson wrote:
> In the last episode (Apr 09), Chris Telting said:
>> Just a few questions about what ZFS actually does.  So if anyone has
>> intimate knowledge about ZFS's implementation on Freebsd I'm sure I and
>>  others would appreciate the answers.
>>
>> When you add a second and or thrid drive/partition to a zpool I'm
>> assuming that it's going to start using the drives like a raid 0
>> stripe.  How do the ZFS versions differ in this?  Does it immediately
>> start striping all files in the background on low priority or does it
>> do it as files are accessed?  Does ZFS in any way do performance
>> testing of
>
> Currently ZFS never moves a block once it has been written.  The whole
> implementation of copy-on-write and snapshots relies on this.  If you add
>  a new zvol to a pool, new data will get balanced across all the zvols
> but old data will stay where it was.  Ideally you should expand pools
> before they get too full, or zpool export/import them into new pools if
> you want good distribution over all disks.  There have been hints for the
> last few years of a "bp rewite" feature appearing, but it has never
> materialized.

One thought that hasn't been mentioned, and probably should be in this
context:  It depends a bit on how you add the disk.  A disk can be added
to a non-RAIDZ zpool as either a stripe or a mirror.  If you add it as a
mirror ('attach' in zpool terms), then yes it starts a background low
priority process that copies data over.

I don't really think that was your question, but it's closely enough
related that I thought it might be relevant.  In the context of stripes it
probably isn't relevant.  But it could be in the context of adding disks.

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------



More information about the freebsd-questions mailing list