Re: Wiki, raid 10, and my new system :-)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 17 2017, Anthony Youngman wrote:

> On 17/10/17 20:04, Phil Turmel wrote:
>> No, it is*wrong*.  Writes in multiples of 4k and entirely within a
>> chunk are passes as-is to the devices.  For mirrors, all affected
>> devices get a copy of the request.  For parity raid, the 4k stripes
>> corresponding to those 4k blocks will be pulled into the stripe cache
>> for recalculation.  Not whole chunk-size stripes.  The stripe cache is
>> multiples of 4k, not multiples of the chunk size!
>> 
>> Writes smaller than 4k, or not aligned to 4k, will generate a
>> read-modify-write cycle of the 4k block involved.  Not the whole chunk.
>> 
>> It is more accurate to say that a chunk may be the*largest*  a request
>> can be before it is split between devices.
>
> Okay, I think I need to update my understanding on this ... :-)
>
> Let's say a chunk is 12K. That's three 4K blocks to drive 1, followed by 
> three to drive 2 etc. Does that mean that each chunk is split across 
> three stripes, or is the stripe all the 12K chunks one per drive?

RAID5 would not allow a 12K chunk size (must be power of 2) but RAID0
would.  Not sure about RAID10.

I interpret "stripe" to mean "a set of chunks, one from each device".
So if you had a RAID10 with a 12K chunk size and 3 devices, then a
stripe would be 36K of space, 12K per device.

This is primarily an address-space mapping.  Think of it as a function
from "array-address" to "device-index, device-address".

0 -> 0,0
512 -> 0,512
1024 -> 0,1024
....
3072 -> 1,0
3584 -> 1,512
....

No imagine that the application always sends 512 I/O requests.  Each I/O
request is mapped through the above function and sent to the appropriate
device with the new address.

In practice, larger requests are allowed and the a split into
sub-requests if the function isn't contiguous for the whole range of a
particular request.


>
> In other words, does a stripe consist of one block per drive, or one 
> chunk per drive?

One chunk per drive.

Note that inside the md/raid5 code the word "stripe" usually means one
PAGE per drive.  This is an unfortunately historical accident.  I
sometimes use the word "strip" (no 'e') to mean one page (or one block)
per device.  A strip is not contiguous in the array address space.  A
stripe is.

Thanks,
NeilBrown

>
> (I'll put a "sic" on that page then, just to point out it's a 
> misunderstanding by the original author. As I said, I'd rather not mess 
> around with the page now.)
>
> Cheers,
> Wol

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux