1

the man page for mdadm says: "[chunk] is only meaningful for RAID0, RAID4, RAID5, RAID6, and RAID10." i.e. it does not apply for raid1. even if you pass the value, it will say "ignoring chunk size" and after the raid 1 is created, you get:

md1 : active raid1 ... 4883639488 blocks super 1.2 ... bitmap: 0/37 pages [0KB], 65536KB chunk

for some reason it used a 65Mb for a 5.6Tb disk size. Why?

then, the man page for mkfs.ext4 says

stride=stride-size = Configure the filesystem for a RAID array with stride-size filesystem blocks. This is the number of blocks read or written to disk before moving to the next disk, which is sometimes referred to as the chunk size. This mostly affects placement of filesys‐ tem metadata like bitmaps at mke2fs time to avoid placing them on a single disk, which can hurt performance. It may also be used by the block allocator.

stripe_width=stripe-width = Configure the filesystem for a RAID array with stripe-width filesystem blocks per stripe. This is typically stride-size * N, where N is the number of data-bearing disks in the RAID (e.g. for RAID 5 there is one parity disk, so N will be the number of disks in the array minus 1). This allows the block allocator to prevent read-modify-write of the parity in a RAID stripe if possible when the data is written.

What does all that means for RAID1? should i just repeat the same value as i got for chunck above? and ignore stripe_width as RAID1 falls out of the "if possible" note? or does it not?

it's not very clear what I am supposed to do for RAID1. using the formulas i found in other tutorials for RAID0 and RAID5, i got those numbers for my RAID1 array, which i think are NOT correct.. mkfs.ext4 -b 4096 -E stride=16384,stripe-width=16384

1

I think this sould be fine as you are not striping anything. You only need that number to tell after how much data the next disk should be used. However, you effectively have only one data disk (and one mirror of it) so the controller doesn't need to change the disk and thus it should be fine. The high number also makes sense in my opinion as the controller would only ask itself after a large chunk which disk to use. So this should limit the overhead.

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.