Skip to contentSkip to conversation

XFS sunit/swidth for raid10

DISCUSSION Peter Rabbitson 2 participants 6 messages Mar 21, 2007 – Mar 25, 2007 MD RAID

lore
Share & tools
lore
#0 lore raw

Hi,
How does one determine the XFS sunit and swidth sizes for a software raid10 with 3 copies?

Thanks

Peter

#1 lore raw
Quoted 3 lines · Peter Rabbitson

Hi,
How does one determine the XFS sunit and swidth sizes for a software raid10 with 3 copies?

mkfs.xfs uses the GET_ARRAY_INFO ioctl to get the data it needs from software raid and select an appropriate sunit/swidth...

although i'm not sure i agree entirely with its choice for raid10:

                *sunit = md.chunk_size >> 9;
                *swidth = *sunit * md.raid_disks;

i'd think it would depend on the layout of the raid10 (near, far, offset)... for near2 on 4 disks i'd expect swidth to be only 2*sunit... but for far2 on 4 disks i'd expect 4*sunit... but i'm not sure. it probably doesn't matter.

-dean

#2 lore raw
Quoted 9 lines · dean gaudet
Quoted 3 lines · Peter Rabbitson

Hi,
How does one determine the XFS sunit and swidth sizes for a software raid10 with 3 copies?

mkfs.xfs uses the GET_ARRAY_INFO ioctl to get the data it needs from software raid and select an appropriate sunit/swidth...

although i'm not sure i agree entirely with its choice for raid10:

So do I, especially as it makes no checks for the amount of copies (3 in my case, not 2).

Quoted 1 line

it probably doesn't matter.

This was essentially my question. For an array -pf3 -c1024 I get swidth = 4 * sunit = 4MiB. Is it about right and does it matter at all?

#3 lore raw
Quoted 13 lines · Peter Rabbitson
Quoted 11 lines · dean gaudet
Quoted 4 lines · Peter Rabbitson

Hi,
How does one determine the XFS sunit and swidth sizes for a software raid10
with 3 copies?

mkfs.xfs uses the GET_ARRAY_INFO ioctl to get the data it needs from software raid and select an appropriate sunit/swidth...

although i'm not sure i agree entirely with its choice for raid10:

Quoted 7 lines

So do I, especially as it makes no checks for the amount of copies (3 in my case, not 2).

Quoted 1 line

it probably doesn't matter.

This was essentially my question. For an array -pf3 -c1024 I get swidth = 4 * sunit = 4MiB. Is it about right and does it matter at all?

how many drives?

-dean

#4 lore raw
Quoted 13 lines · dean gaudet
Quoted 11 lines · Peter Rabbitson
Quoted 10 lines · dean gaudet
Quoted 4 lines · Peter Rabbitson

Hi,
How does one determine the XFS sunit and swidth sizes for a software raid10
with 3 copies?

mkfs.xfs uses the GET_ARRAY_INFO ioctl to get the data it needs from software raid and select an appropriate sunit/swidth...

although i'm not sure i agree entirely with its choice for raid10:

Quoted 9 lines
Quoted 6 lines

So do I, especially as it makes no checks for the amount of copies (3 in my case, not 2).

Quoted 1 line

it probably doesn't matter.

This was essentially my question. For an array -pf3 -c1024 I get swidth = 4 * sunit = 4MiB. Is it about right and does it matter at all?

how many drives?

Sorry. 4 drives, 3 far copies (so any 2 drives can fail), 1M chunk.

#5 lore raw
Quoted 19 lines · Peter Rabbitson
Quoted 18 lines · dean gaudet
Quoted 16 lines · Peter Rabbitson
Quoted 10 lines · dean gaudet
Quoted 4 lines · Peter Rabbitson

Hi,
How does one determine the XFS sunit and swidth sizes for a software raid10
with 3 copies?

mkfs.xfs uses the GET_ARRAY_INFO ioctl to get the data it needs from software raid and select an appropriate sunit/swidth...

although i'm not sure i agree entirely with its choice for raid10:

So do I, especially as it makes no checks for the amount of copies (3 in my
case, not 2).

Quoted 1 line

it probably doesn't matter.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

This was essentially my question. For an array -pf3 -c1024 I get swidth = 4 *
sunit = 4MiB. Is it about right and does it matter at all?

how many drives?

Sorry. 4 drives, 3 far copies (so any 2 drives can fail), 1M chunk.

my mind continues to be blown by linux raid10.

so that's like raid1 on 4 disks except the copies are offset by 1/4th of the disk?

i think swidth = 4*sunit is the right config then -- 'cause a read of 4MiB will stride all 4 disks...

-dean