About RAIDZ geometry

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Jul 29 08:40:48 UTC 2009


On Tue, Jul 28, 2009 at 02:13:30PM +0800, cooper wrote:
> Hi folks,
> 
> Now that ZFS has been ported to FreeBSD, I think it's proper to ask
> these questions in this mailing list.
> 
> Is there any detailed documentation about RAIDZ geometry? I has been
> wandering how zfs remembers which disk sectors are for data and which
> ones are for parity.
> 
> They claimed "Every block is its own RAID-Z stripe" does that mean zfs
> writes exactly one block in every vdev_raidz_io_start if the io type of
> the zio is write?
> 
> And also claimed "You have to traverse the filesystem metadata to
> determine the RAID-Z geometry" where is this metadata stored?

If you have file system separated from volume manager doing RAID, the
volume manager has no knowledge where the live data is, etc.

Imagine a ZFS 5-disks RAIDZ1 configuration:

	disk0	disk1	disk2	disk3	disk4

ZFS' file system level wants to store two sectors of data so it sends
1kB of data to lower ZFS layers. You then get something like this:

	disk0	disk1	disk2	disk3	disk4

	data0	data1	parity01

Now ZFS wants to store one sector and you get this:

	disk0	disk1	disk2	disk3	disk4

	data0	data1	parity01 data2	parity2

ZFS can do that, because he knows where and how to read the data back
(its a file system and volume manager). ZFS will never try to read three
sectors as one block of data.

This is impossible to do when file system is separated from volume
manager.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20090729/80e60ce0/attachment.pgp


More information about the freebsd-fs mailing list