1 |
Am 04.05.2011 11:08, schrieb Evgeny Bushkov: |
2 |
> On 04.05.2011 11:54, Joost Roeleveld wrote: |
3 |
>> On Wednesday 04 May 2011 10:07:58 Evgeny Bushkov wrote: |
4 |
>>> On 04.05.2011 01:49, Florian Philipp wrote: |
5 |
>>>> Am 03.05.2011 19:54, schrieb Evgeny Bushkov: |
6 |
>>>>> Hi. |
7 |
>>>>> How can I find out which is the parity disk in a RAID-4 soft array? I |
8 |
>>>>> couldn't find that in the mdadm manual. I know that RAID-4 features a |
9 |
>>>>> dedicated parity disk that is usually the bottleneck of the array, so |
10 |
>>>>> that disk must be as fast as possible. It seems useful to employ a few |
11 |
>>>>> slow disks with a relatively fast disk in such a RAID-4 array. |
12 |
>>>>> |
13 |
>>>>> Best regards, |
14 |
>>>>> Bushkov E. |
15 |
>>>> You are seriously considering a RAID4? You know, there is a reason why |
16 |
>>>> it was superseded by RAID5. Given the way RAID4 operates, a first guess |
17 |
>>>> for finding the parity disk in a running array would be the one with the |
18 |
>>>> worst SMART data. It is the parity disk that dies the soonest. |
19 |
>>>> |
20 |
>>>> From looking at the source code it seems like the last specified disk is |
21 |
>>>> parity. Disclaimer: I'm no kernel hacker and I have only inspected the |
22 |
>>>> code, not tried to understand the whole MD subsystem. |
23 |
>>>> |
24 |
>>>> Regards, |
25 |
>>>> Florian Philipp |
26 |
>>> Thank you for answering... The reason I consider RAID-4 is a few |
27 |
>>> sata/150 drives and a pair of sata II drives I've got. Let's look at |
28 |
>>> the problem from the other side: I can create RAID-0(from sata II |
29 |
>>> drives) and then add it to RAID-4 as the parity disk. It doesn't bother |
30 |
>>> me if any disk from the RAID-0 fails, that wouldn't disrupt my RAID-4 |
31 |
>>> array. For example: |
32 |
>>> |
33 |
>>> mdadm --create /dev/md1 --level=4 -n 3 -c 128 /dev/sdb1 /dev/sdc1 missing |
34 |
>>> mdadm --create /dev/md2 --level=0 -n 2 -c 128 /dev/sda1 /dev/sdd1 |
35 |
>>> mdadm /dev/md1 --add /dev/md2 |
36 |
>>> |
37 |
>>> livecd ~ # cat /proc/mdstat |
38 |
>>> Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] |
39 |
>>> md2 : active raid0 sdd1[1] sda1[0] |
40 |
>>> 20969472 blocks super 1.2 128k chunks |
41 |
>>> |
42 |
>>> md1 : active raid4 md2[3] sdc1[1] sdb1[0] |
43 |
>>> 20969216 blocks super 1.2 level 4, 128k chunk, algorithm 0 [3/2] [UU_] |
44 |
>>> [========>............] recovery = 43.7% (4590464/10484608) finish=1.4min |
45 |
>>> speed=69615K/sec |
46 |
>>> |
47 |
>>> That configuration works well, but I'm not sure if md1 is the parity |
48 |
>>> disk here, that's why I asked. May be I'm wrong and RAID-5 is the only |
49 |
>>> worth array, I'm just trying to consider all pros and cons here. |
50 |
>>> |
51 |
>>> Best regards, |
52 |
>>> Bushkov E. |
53 |
>> I only use RAID-0 (when I want performance and don't care about the data), |
54 |
>> RAID-1 (for data I can't afford to loose) and RAID-5 (data I would like to |
55 |
>> keep). I have never bothered with RAID-4. |
56 |
>> |
57 |
[...] |
58 |
> |
59 |
> I've run some tests with different chunk sizes, the fastest was |
60 |
> raid-10(4 disks), raid-5(3 disks) was closely after. Raid-4(4 disks) was |
61 |
> almost as fast as raid-5 so I don't see any sense to use it. |
62 |
> |
63 |
> Best regards, |
64 |
> Bushkov E. |
65 |
> |
66 |
> |
67 |
> |
68 |
|
69 |
When you have an array with uneven disk speeds, you might consider using |
70 |
the --write-mostly option of mdadm: |
71 |
-W, --write-mostly |
72 |
subsequent devices lists in a --build, --create, or --add command |
73 |
will be flagged as 'write-mostly'. This is valid for RAID1 only and |
74 |
means that the 'md' driver will avoid reading from these devices if at |
75 |
all possible. This can be useful if mirroring over a slow link. |
76 |
|
77 |
This should help in concurrent read and write operations because the |
78 |
kernel will not dispatch read requests to a disk that is already having |
79 |
trouble managing the write operations. |
80 |
|
81 |
On another point: Are you sure your disks have different speeds? SATA150 |
82 |
and 300 are no reliable indicator because most HDDs cannot saturate the |
83 |
SATA port anyway. dd is still the most reliable way to measure |
84 |
sequential throughput. |
85 |
|
86 |
Regards, |
87 |
Florian Philipp |