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 07:56:15
Message-Id: 20110504075634.1339D1F86@data.antarean.org
In Reply to: Re: [gentoo-user] mdadm and raid4 by Evgeny Bushkov
1 On Wednesday 04 May 2011 10:07:58 Evgeny Bushkov wrote:
2 > On 04.05.2011 01:49, Florian Philipp wrote:
3 > > Am 03.05.2011 19:54, schrieb Evgeny Bushkov:
4 > >> Hi.
5 > >> How can I find out which is the parity disk in a RAID-4 soft array? I
6 > >> couldn't find that in the mdadm manual. I know that RAID-4 features a
7 > >> dedicated parity disk that is usually the bottleneck of the array, so
8 > >> that disk must be as fast as possible. It seems useful to employ a few
9 > >> slow disks with a relatively fast disk in such a RAID-4 array.
10 > >>
11 > >> Best regards,
12 > >> Bushkov E.
13 > >
14 > > You are seriously considering a RAID4? You know, there is a reason why
15 > > it was superseded by RAID5. Given the way RAID4 operates, a first guess
16 > > for finding the parity disk in a running array would be the one with the
17 > > worst SMART data. It is the parity disk that dies the soonest.
18 > >
19 > > From looking at the source code it seems like the last specified disk is
20 > > parity. Disclaimer: I'm no kernel hacker and I have only inspected the
21 > > code, not tried to understand the whole MD subsystem.
22 > >
23 > > Regards,
24 > > Florian Philipp
25 >
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
54 I only use RAID-0 (when I want performance and don't care about the data),
55 RAID-1 (for data I can't afford to loose) and RAID-5 (data I would like to
56 keep). I have never bothered with RAID-4.
57
58 What do you see in the "dmesg" after the mdadm commands?
59 It might actually mention which is the parity disk in there.
60
61 --
62 Joost

Replies

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