What happens if you use a hardware raid, should the stride option be considered? It seems you are referring to software raid, correct?<br>TIA<br><br><br><div class="gmail_quote">On Thu, Jun 19, 2008 at 7:42 AM, Theodore Tso <<a href="mailto:tytso@mit.edu">tytso@mit.edu</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Thu, Jun 19, 2008 at 06:21:24AM -0400, Mag Gam wrote:<br>
> ok, in a way its like a stripe? I though when you do a stripe you put the<br>
> metadata on number of disks too. How is that different? Is there a diagram I<br>
> can refer to?<br>
<br>
</div>Yes, which is why the mke2fs man page states:<br>
<br>
        stride=<stripe-size><br>
                Configure  the  filesystem  for  a  RAID  array with<br>
                <stripe-size> filesystem blocks per stripe.<br>
<br>
So if the size of a stripe on each a disk is 64k, and you are using a<br>
4k filesystem blocksize, then 64k/4k == 16, and that would be an<br>
"ideal" stride size, in that for each successive block group, the<br>
inode and block bitmap would increased by an offset of 16 blocks from<br>
the beginning of the block group.<br>
<br>
The reason for doing this is to avoid problems where the block bitmap<br>
ends up on the same disk for every single block group.  The classic<br>
case where this would happen is if you have a 5 disks in a RAID 5<br>
configuration, which means with 4 disks per stripe, and 8192 blocks in<br>
a blockgroup, then if the block bitmap is always at the same offset<br>
from the beginning of the block group, one disk will get all of the<br>
block bitmaps, and that ends up being a major hot spot problem for the<br>
hard drive.<br>
<br>
As it turns out, if you use 4 disks in a RAID 5 configuration, or 6<br>
disks in a RAID 5 configuration, this problem doesn't arise at all,<br>
and you don't need to use the stride option.  And in most cases,<br>
simply using a stride=1, that is actually enough to make sure that<br>
each block and inode bitmaps will get forced onto successively<br>
different disks.<br>
<br>
With ext4's flex_bg enhancement, the need to specify stride option of<br>
RAID arrays will also go away.<br>
<br>
                                                        - Ted<br>
</blockquote></div><br>