Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For reasons too complex to get into here, I'm using a 3-disk RAID1E on some linux systems. See here for more info on that.

So my understanding is that for optimizing filesystem layout on this volume, you use the following calculation:

chunk-size = 64kB
block-size = 4kB
stride = chunk / block = 16
stripe-width = stride * ( (numdisks)/2 ) = 16 * 1.5 = 24

However, mkfs.ext3 gives a warning when I use that calculation for setting the stripe-width, that it should be a power of two.

So my question is, am I doing it right? Should I be treating it like a standard four-disk RAID10, since the stripes are of the same size?

Update: it's not a degraded array, it's a fully supported configuration. Read the link from the first paragraph.

share|improve this question
3 disk...RAID 10? You mean you're running an intentionally degraded array? – MDMarra Jul 20 '12 at 18:29
If you had the correct number of drives in your array then it would work out correctly. – Iain Jul 20 '12 at 18:32
@MDMarra - no, it's not degraded - linux md supports 3-disk RAID10 where each stripe is mirrored across two disks, per the link in the first paragraph. – Alex G Jul 20 '12 at 18:39
So you have a RAID 1E, then. – MDMarra Jul 20 '12 at 18:43
It appears that Linux MD is lying to you. What you have is a R1E. The calculations you have is for an R10 which requires an even number of disks. – Iain Jul 20 '12 at 18:48

Setting your stripe width higher than 64kB will be suboptimal.

Any write of a size higher than 64kB will result in 4 writes - one write to one disk, one write to another, and two writes to one.

Just set your stripe width to 64kB.

share|improve this answer
Why? What's actually happening with the disk stripes and writes that makes this the case? – Alex G Jul 20 '12 at 20:13
up vote 0 down vote accepted

I ran some experiments using XFS instead of ext3 on various size and levels of MD RAID. It seems like the following formula applies across the board:

# chunk is specified in mdadm create, block in mkfs
stride = chunk / block
stripe-width = ((slices - parity) * stride

Where parity is zero for RAID0/10/1E, one for RAID5, two for RAID6.

So in the case of my original question, stripe-width should be set to 48 (64kB chunk, 4kB block, 3 slices, zero parity). When I use these settings, mkfs.ext3 no longer gives a warning about stripe-width not being divisible by the stride.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.