Is this configuration ok? I've read that the stripe size should match the block size. I am mostly storing 8-30GB single files that are read sequentially. What should I adjust, and how? Ubuntu doesn't let me create a block size greater than 4k. Thanks for your help.


Your filesystem block size should be something that divides you RAID stripe size to produce an integer value, so 4K filesystem blocks with a 256K stripe size is fine.

For most efficient operation, especially with striped RAID setups like RAID5, you need to tell the filesystem what the controllers stripe size is so it can align its structures in a way that avoids them overlapping the edge of RAID stripes: for XFS this is done by giving the sunit= or su=options when you create the filesystem (see man mkfs.xfs for more details and options).

You also need to make sure that the filesystem itself starts on a block at the start of a RAID stripe, otherwise the filesystem's attempts to align things efficiently will be thwarted. Because the RAID volume presented to the BIOS will have the boot sector at the start, this will mean starting the first partition 256Kb into the array (unless you are creating the filesystem on the raw device, i.e. on sdb rather than partitioning the array into sdb1 and so forth, in which case the filesystem will start in block 0 - but you can't do this if you plan to boot off the array).

|improve this answer|||||
  • Thanks for this great answer. I forgot what flags I set to XFS when I made the filesystem. Is there any way I can check against the live array? I am using Ubuntu. Thanks. – ensnare Mar 31 '11 at 2:09

Stripe size / alignment is most important for small files or random access. In your case (large files, sequential access), I think it probably doesn't matter.

It would (of course) be worth testing, assuming you have a test that conforms to your typical load.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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