Gentoo Archives: gentoo-user

From: Joost Roeleveld <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] mdadm and raid4
Date: Wed, 04 May 2011 09:40:27
Message-Id: 20110504094048.00A06202A@data.antarean.org
In Reply to: Re: [gentoo-user] mdadm and raid4 by Evgeny Bushkov
1 On Wednesday 04 May 2011 13:08:34 Evgeny Bushkov wrote:
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
8 > >>>> array? I
9 > >>>> couldn't find that in the mdadm manual. I know that RAID-4
10 > >>>> features a
11 > >>>> dedicated parity disk that is usually the bottleneck of the array,
12 > >>>> so
13 > >>>> that disk must be as fast as possible. It seems useful to employ a
14 > >>>> few
15 > >>>> slow disks with a relatively fast disk in such a RAID-4 array.
16 > >>>>
17 > >>>> Best regards,
18 > >>>> Bushkov E.
19 > >>>
20 > >>> You are seriously considering a RAID4? You know, there is a reason
21 > >>> why
22 > >>> it was superseded by RAID5. Given the way RAID4 operates, a first
23 > >>> guess
24 > >>> for finding the parity disk in a running array would be the one with
25 > >>> the worst SMART data. It is the parity disk that dies the soonest.
26 > >>>
27 > >>> From looking at the source code it seems like the last specified
28 > >>> disk is parity. Disclaimer: I'm no kernel hacker and I have only
29 > >>> inspected the code, not tried to understand the whole MD subsystem.
30 > >>>
31 > >>> Regards,
32 > >>> Florian Philipp
33 > >>
34 > >> Thank you for answering... The reason I consider RAID-4 is a few
35 > >> sata/150 drives and a pair of sata II drives I've got. Let's look at
36 > >> the problem from the other side: I can create RAID-0(from sata II
37 > >> drives) and then add it to RAID-4 as the parity disk. It doesn't
38 > >> bother
39 > >> me if any disk from the RAID-0 fails, that wouldn't disrupt my RAID-4
40 > >> array. For example:
41 > >>
42 > >> mdadm --create /dev/md1 --level=4 -n 3 -c 128 /dev/sdb1 /dev/sdc1
43 > >> missing mdadm --create /dev/md2 --level=0 -n 2 -c 128 /dev/sda1
44 > >> /dev/sdd1 mdadm /dev/md1 --add /dev/md2
45 > >>
46 > >> livecd ~ # cat /proc/mdstat
47 > >> Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
48 > >> md2 : active raid0 sdd1[1] sda1[0]
49 > >>
50 > >> 20969472 blocks super 1.2 128k chunks
51 > >>
52 > >> md1 : active raid4 md2[3] sdc1[1] sdb1[0]
53 > >>
54 > >> 20969216 blocks super 1.2 level 4, 128k chunk, algorithm 0
55 > >> [3/2] [UU_]
56 > >>
57 > >> [========>............] recovery = 43.7% (4590464/10484608)
58 > >> finish=1.4min speed=69615K/sec
59 > >>
60 > >> That configuration works well, but I'm not sure if md1 is the parity
61 > >> disk here, that's why I asked. May be I'm wrong and RAID-5 is the only
62 > >> worth array, I'm just trying to consider all pros and cons here.
63 > >>
64 > >> Best regards,
65 > >> Bushkov E.
66 > >
67 > > I only use RAID-0 (when I want performance and don't care about the
68 > > data), RAID-1 (for data I can't afford to loose) and RAID-5 (data I
69 > > would like to keep). I have never bothered with RAID-4.
70 > >
71 > > What do you see in the "dmesg" after the mdadm commands?
72 > > It might actually mention which is the parity disk in there.
73 > >
74 > > --
75 > > Joost
76 >
77 > There's nothing special in dmesg:
78 >
79 > md: bind<md2>
80 > RAID conf printout:
81 > --- level:4 rd:3 wd:2
82 > disk 0, o:1, dev:sdb1
83 > disk 1, o:1, dev:sdc1
84 > disk 2, o:1, dev:md2
85 > md: recovery of RAID array md1
86 >
87 > I've run some tests with different chunk sizes, the fastest was
88 > raid-10(4 disks), raid-5(3 disks) was closely after. Raid-4(4 disks) was
89 > almost as fast as raid-5 so I don't see any sense to use it.
90 >
91 > Best regards,
92 > Bushkov E.
93
94 What's the result of:
95 mdadm --misc --detail /dev/md1
96 ?
97
98 Not sure what info this command will provide with a RAID-4...
99
100 --
101 Joost

Replies

Subject Author
Re: [gentoo-user] mdadm and raid4 Evgeny Bushkov <zhen@×××××××××.ru>