1 |
2010/10/31 Florian Philipp <lists@f_philipp.fastmail.net> |
2 |
> |
3 |
> See question 9 here: |
4 |
> http://tldp.org/HOWTO/Software-RAID-0.4x-HOWTO-8.html |
5 |
> |
6 |
> and also the calculator here: |
7 |
> http://busybox.net/~aldot/mkfs_stride.html |
8 |
> |
9 |
> There might be more alignment issues with LVM on RAID. I don't think it |
10 |
> will be a problem as long as LVM's physical extent size (default 4MB) is |
11 |
> a multiple of the RAID stripe size (default 64kB?). Someone with more |
12 |
> experience in these setups than me might want to comment on my guess. |
13 |
|
14 |
Okay, so after a holiday trip, some hard weeks of labour, I went ill. |
15 |
During recovery I decided to dive into this issue again :-) |
16 |
|
17 |
I found out that my current chunk size is 64K: |
18 |
|
19 |
martindesktop ~ # mdadm -Q --detail /dev/md3 |
20 |
<cut> |
21 |
Chunk Size : 64K |
22 |
<cut> |
23 |
martindesktop ~ # |
24 |
|
25 |
and my block size is 4KiB: |
26 |
|
27 |
martindesktop ~ # /sbin/dumpe2fs /dev/sda3 | grep 'Block size' |
28 |
<cut> |
29 |
Block size: 4096 |
30 |
<cut> |
31 |
martindesktop ~ # |
32 |
|
33 |
The calculator output is: |
34 |
|
35 |
mkfs.ext3 -b 4096 -E stride=16,stripe-width=32 |
36 |
|
37 |
The maintained RAID howto at: |
38 |
|
39 |
https://raid.wiki.kernel.org/index.php/RAID_setup |
40 |
|
41 |
says that stride and stride-width can be changed afterwards by using: |
42 |
|
43 |
tune2fs -E stride=n,stripe-width=m /dev/mdx |
44 |
|
45 |
So that's what I did: |
46 |
|
47 |
martindesktop / # tune2fs -E stride=16,stripe-width=32 /dev/md3 |
48 |
tune2fs 1.41.12 (17-May-2010) |
49 |
Setting stride size to 16 |
50 |
Setting stripe width to 32 |
51 |
martindesktop / # |
52 |
|
53 |
(this took less than a second) |
54 |
|
55 |
I also read the mdadmin man-page. It looks like one can adjust the |
56 |
chunk size (also for RAID-0) without repartitioning, but I found |
57 |
(using google) no hard evidence that 64K is a wrong choice for a |
58 |
desktop system. I won't perform my own benchmarks (based on what??) |
59 |
and will stick with the 64K. |
60 |
|
61 |
Regards, |
62 |
|
63 |
Martin |