public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] mdadm and raid4
@ 2011-05-03 17:54 Evgeny Bushkov
  2011-05-03 21:49 ` Florian Philipp
  0 siblings, 1 reply; 10+ messages in thread
From: Evgeny Bushkov @ 2011-05-03 17:54 UTC (permalink / raw
  To: gentoo-user

Hi.
How can I find out which is the parity disk in a RAID-4 soft array? I
couldn't find that in the mdadm manual.  I know that RAID-4 features a
dedicated parity disk that is usually the bottleneck of the array, so
that disk must be as fast as possible. It seems useful to employ a few
slow disks with a relatively fast disk in such a RAID-4 array.

Best regards,
Bushkov E.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] mdadm and raid4
  2011-05-03 17:54 [gentoo-user] mdadm and raid4 Evgeny Bushkov
@ 2011-05-03 21:49 ` Florian Philipp
  2011-05-04  6:07   ` Evgeny Bushkov
  0 siblings, 1 reply; 10+ messages in thread
From: Florian Philipp @ 2011-05-03 21:49 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 971 bytes --]

Am 03.05.2011 19:54, schrieb Evgeny Bushkov:
> Hi.
> How can I find out which is the parity disk in a RAID-4 soft array? I
> couldn't find that in the mdadm manual.  I know that RAID-4 features a
> dedicated parity disk that is usually the bottleneck of the array, so
> that disk must be as fast as possible. It seems useful to employ a few
> slow disks with a relatively fast disk in such a RAID-4 array.
> 
> Best regards,
> Bushkov E.
> 

You are seriously considering a RAID4? You know, there is a reason why
it was superseded by RAID5. Given the way RAID4 operates, a first guess
for finding the parity disk in a running array would be the one with the
worst SMART data. It is the parity disk that dies the soonest.

From looking at the source code it seems like the last specified disk is
parity. Disclaimer: I'm no kernel hacker and I have only inspected the
code, not tried to understand the whole MD subsystem.

Regards,
Florian Philipp


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] mdadm and raid4
  2011-05-03 21:49 ` Florian Philipp
@ 2011-05-04  6:07   ` Evgeny Bushkov
  2011-05-04  7:54     ` Joost Roeleveld
  0 siblings, 1 reply; 10+ messages in thread
From: Evgeny Bushkov @ 2011-05-04  6:07 UTC (permalink / raw
  To: gentoo-user

On 04.05.2011 01:49, Florian Philipp wrote:
> Am 03.05.2011 19:54, schrieb Evgeny Bushkov:
>> Hi.
>> How can I find out which is the parity disk in a RAID-4 soft array? I
>> couldn't find that in the mdadm manual.  I know that RAID-4 features a
>> dedicated parity disk that is usually the bottleneck of the array, so
>> that disk must be as fast as possible. It seems useful to employ a few
>> slow disks with a relatively fast disk in such a RAID-4 array.
>>
>> Best regards,
>> Bushkov E.
>>
> You are seriously considering a RAID4? You know, there is a reason why
> it was superseded by RAID5. Given the way RAID4 operates, a first guess
> for finding the parity disk in a running array would be the one with the
> worst SMART data. It is the parity disk that dies the soonest.
>
> From looking at the source code it seems like the last specified disk is
> parity. Disclaimer: I'm no kernel hacker and I have only inspected the
> code, not tried to understand the whole MD subsystem.
>
> Regards,
> Florian Philipp
>
Thank you for answering... The reason I consider RAID-4 is a few
sata/150 drives  and a pair of sata II drives I've got. Let's look at
the problem from the other side: I can create RAID-0(from sata II
drives) and then add it to RAID-4 as the parity disk. It doesn't bother
me if any disk from the RAID-0 fails, that wouldn't disrupt my RAID-4
array. For example:

mdadm --create /dev/md1 --level=4 -n 3 -c 128 /dev/sdb1 /dev/sdc1 missing
mdadm --create /dev/md2 --level=0 -n 2 -c 128 /dev/sda1 /dev/sdd1
mdadm /dev/md1 --add /dev/md2

livecd ~ # cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid0 sdd1[1] sda1[0]
      20969472 blocks super 1.2 128k chunks
     
md1 : active raid4 md2[3] sdc1[1] sdb1[0]
      20969216 blocks super 1.2 level 4, 128k chunk, algorithm 0 [3/2] [UU_]
      [========>............]  recovery = 43.7% (4590464/10484608)
finish=1.4min speed=69615K/sec

That configuration works well, but I'm not sure if md1 is the parity
disk here, that's why I asked. May be I'm wrong and RAID-5 is the only
worth array, I'm just trying to consider all pros and cons here.

Best regards,
Bushkov E.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] mdadm and raid4
  2011-05-04  6:07   ` Evgeny Bushkov
@ 2011-05-04  7:54     ` Joost Roeleveld
  2011-05-04  9:08       ` Evgeny Bushkov
  0 siblings, 1 reply; 10+ messages in thread
From: Joost Roeleveld @ 2011-05-04  7:54 UTC (permalink / raw
  To: gentoo-user

On Wednesday 04 May 2011 10:07:58 Evgeny Bushkov wrote:
> On 04.05.2011 01:49, Florian Philipp wrote:
> > Am 03.05.2011 19:54, schrieb Evgeny Bushkov:
> >> Hi.
> >> How can I find out which is the parity disk in a RAID-4 soft array? I
> >> couldn't find that in the mdadm manual.  I know that RAID-4 features a
> >> dedicated parity disk that is usually the bottleneck of the array, so
> >> that disk must be as fast as possible. It seems useful to employ a few
> >> slow disks with a relatively fast disk in such a RAID-4 array.
> >> 
> >> Best regards,
> >> Bushkov E.
> > 
> > You are seriously considering a RAID4? You know, there is a reason why
> > it was superseded by RAID5. Given the way RAID4 operates, a first guess
> > for finding the parity disk in a running array would be the one with the
> > worst SMART data. It is the parity disk that dies the soonest.
> > 
> > From looking at the source code it seems like the last specified disk is
> > parity. Disclaimer: I'm no kernel hacker and I have only inspected the
> > code, not tried to understand the whole MD subsystem.
> > 
> > Regards,
> > Florian Philipp
> 
> Thank you for answering... The reason I consider RAID-4 is a few
> sata/150 drives  and a pair of sata II drives I've got. Let's look at
> the problem from the other side: I can create RAID-0(from sata II
> drives) and then add it to RAID-4 as the parity disk. It doesn't bother
> me if any disk from the RAID-0 fails, that wouldn't disrupt my RAID-4
> array. For example:
> 
> mdadm --create /dev/md1 --level=4 -n 3 -c 128 /dev/sdb1 /dev/sdc1 missing
> mdadm --create /dev/md2 --level=0 -n 2 -c 128 /dev/sda1 /dev/sdd1
> mdadm /dev/md1 --add /dev/md2
> 
> livecd ~ # cat /proc/mdstat
> Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
> md2 : active raid0 sdd1[1] sda1[0]
>       20969472 blocks super 1.2 128k chunks
> 
> md1 : active raid4 md2[3] sdc1[1] sdb1[0]
>       20969216 blocks super 1.2 level 4, 128k chunk, algorithm 0 [3/2] [UU_]
> [========>............]  recovery = 43.7% (4590464/10484608) finish=1.4min
> speed=69615K/sec
> 
> That configuration works well, but I'm not sure if md1 is the parity
> disk here, that's why I asked. May be I'm wrong and RAID-5 is the only
> worth array, I'm just trying to consider all pros and cons here.
> 
> Best regards,
> Bushkov E.

I only use RAID-0 (when I want performance and don't care about the data), 
RAID-1 (for data I can't afford to loose) and RAID-5 (data I would like to 
keep). I have never bothered with RAID-4.

What do you see in the "dmesg" after the mdadm commands?
It might actually mention which is the parity disk in there.

--
Joost



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] mdadm and raid4
  2011-05-04  7:54     ` Joost Roeleveld
@ 2011-05-04  9:08       ` Evgeny Bushkov
  2011-05-04  9:38         ` Joost Roeleveld
  2011-05-04 12:39         ` Florian Philipp
  0 siblings, 2 replies; 10+ messages in thread
From: Evgeny Bushkov @ 2011-05-04  9:08 UTC (permalink / raw
  To: gentoo-user

On 04.05.2011 11:54, Joost Roeleveld wrote:
> On Wednesday 04 May 2011 10:07:58 Evgeny Bushkov wrote:
>> On 04.05.2011 01:49, Florian Philipp wrote:
>>> Am 03.05.2011 19:54, schrieb Evgeny Bushkov:
>>>> Hi.
>>>> How can I find out which is the parity disk in a RAID-4 soft array? I
>>>> couldn't find that in the mdadm manual.  I know that RAID-4 features a
>>>> dedicated parity disk that is usually the bottleneck of the array, so
>>>> that disk must be as fast as possible. It seems useful to employ a few
>>>> slow disks with a relatively fast disk in such a RAID-4 array.
>>>>
>>>> Best regards,
>>>> Bushkov E.
>>> You are seriously considering a RAID4? You know, there is a reason why
>>> it was superseded by RAID5. Given the way RAID4 operates, a first guess
>>> for finding the parity disk in a running array would be the one with the
>>> worst SMART data. It is the parity disk that dies the soonest.
>>>
>>> From looking at the source code it seems like the last specified disk is
>>> parity. Disclaimer: I'm no kernel hacker and I have only inspected the
>>> code, not tried to understand the whole MD subsystem.
>>>
>>> Regards,
>>> Florian Philipp
>> Thank you for answering... The reason I consider RAID-4 is a few
>> sata/150 drives  and a pair of sata II drives I've got. Let's look at
>> the problem from the other side: I can create RAID-0(from sata II
>> drives) and then add it to RAID-4 as the parity disk. It doesn't bother
>> me if any disk from the RAID-0 fails, that wouldn't disrupt my RAID-4
>> array. For example:
>>
>> mdadm --create /dev/md1 --level=4 -n 3 -c 128 /dev/sdb1 /dev/sdc1 missing
>> mdadm --create /dev/md2 --level=0 -n 2 -c 128 /dev/sda1 /dev/sdd1
>> mdadm /dev/md1 --add /dev/md2
>>
>> livecd ~ # cat /proc/mdstat
>> Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
>> md2 : active raid0 sdd1[1] sda1[0]
>>       20969472 blocks super 1.2 128k chunks
>>
>> md1 : active raid4 md2[3] sdc1[1] sdb1[0]
>>       20969216 blocks super 1.2 level 4, 128k chunk, algorithm 0 [3/2] [UU_]
>> [========>............]  recovery = 43.7% (4590464/10484608) finish=1.4min
>> speed=69615K/sec
>>
>> That configuration works well, but I'm not sure if md1 is the parity
>> disk here, that's why I asked. May be I'm wrong and RAID-5 is the only
>> worth array, I'm just trying to consider all pros and cons here.
>>
>> Best regards,
>> Bushkov E.
> I only use RAID-0 (when I want performance and don't care about the data), 
> RAID-1 (for data I can't afford to loose) and RAID-5 (data I would like to 
> keep). I have never bothered with RAID-4.
>
> What do you see in the "dmesg" after the mdadm commands?
> It might actually mention which is the parity disk in there.
>
> --
> Joost
>
There's nothing special in dmesg:

md: bind<md2>
RAID conf printout:
 --- level:4 rd:3 wd:2
 disk 0, o:1, dev:sdb1
 disk 1, o:1, dev:sdc1
 disk 2, o:1, dev:md2
md: recovery of RAID array md1

I've run some tests with different chunk sizes, the fastest was
raid-10(4 disks), raid-5(3 disks) was closely after. Raid-4(4 disks) was
almost as fast as raid-5 so I don't see any sense to use it.

Best regards,
Bushkov E.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] mdadm and raid4
  2011-05-04  9:08       ` Evgeny Bushkov
@ 2011-05-04  9:38         ` Joost Roeleveld
  2011-05-04  9:59           ` Evgeny Bushkov
  2011-05-04 12:39         ` Florian Philipp
  1 sibling, 1 reply; 10+ messages in thread
From: Joost Roeleveld @ 2011-05-04  9:38 UTC (permalink / raw
  To: gentoo-user

On Wednesday 04 May 2011 13:08:34 Evgeny Bushkov wrote:
> On 04.05.2011 11:54, Joost Roeleveld wrote:
> > On Wednesday 04 May 2011 10:07:58 Evgeny Bushkov wrote:
> >> On 04.05.2011 01:49, Florian Philipp wrote:
> >>> Am 03.05.2011 19:54, schrieb Evgeny Bushkov:
> >>>> Hi.
> >>>> How can I find out which is the parity disk in a RAID-4 soft
> >>>> array? I
> >>>> couldn't find that in the mdadm manual.  I know that RAID-4
> >>>> features a
> >>>> dedicated parity disk that is usually the bottleneck of the array,
> >>>> so
> >>>> that disk must be as fast as possible. It seems useful to employ a
> >>>> few
> >>>> slow disks with a relatively fast disk in such a RAID-4 array.
> >>>> 
> >>>> Best regards,
> >>>> Bushkov E.
> >>> 
> >>> You are seriously considering a RAID4? You know, there is a reason
> >>> why
> >>> it was superseded by RAID5. Given the way RAID4 operates, a first
> >>> guess
> >>> for finding the parity disk in a running array would be the one with
> >>> the worst SMART data. It is the parity disk that dies the soonest.
> >>> 
> >>> From looking at the source code it seems like the last specified
> >>> disk is parity. Disclaimer: I'm no kernel hacker and I have only
> >>> inspected the code, not tried to understand the whole MD subsystem.
> >>> 
> >>> Regards,
> >>> Florian Philipp
> >> 
> >> Thank you for answering... The reason I consider RAID-4 is a few
> >> sata/150 drives  and a pair of sata II drives I've got. Let's look at
> >> the problem from the other side: I can create RAID-0(from sata II
> >> drives) and then add it to RAID-4 as the parity disk. It doesn't
> >> bother
> >> me if any disk from the RAID-0 fails, that wouldn't disrupt my RAID-4
> >> array. For example:
> >> 
> >> mdadm --create /dev/md1 --level=4 -n 3 -c 128 /dev/sdb1 /dev/sdc1
> >> missing mdadm --create /dev/md2 --level=0 -n 2 -c 128 /dev/sda1
> >> /dev/sdd1 mdadm /dev/md1 --add /dev/md2
> >> 
> >> livecd ~ # cat /proc/mdstat
> >> Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
> >> md2 : active raid0 sdd1[1] sda1[0]
> >> 
> >>       20969472 blocks super 1.2 128k chunks
> >> 
> >> md1 : active raid4 md2[3] sdc1[1] sdb1[0]
> >> 
> >>       20969216 blocks super 1.2 level 4, 128k chunk, algorithm 0
> >>       [3/2] [UU_]
> >> 
> >> [========>............]  recovery = 43.7% (4590464/10484608)
> >> finish=1.4min speed=69615K/sec
> >> 
> >> That configuration works well, but I'm not sure if md1 is the parity
> >> disk here, that's why I asked. May be I'm wrong and RAID-5 is the only
> >> worth array, I'm just trying to consider all pros and cons here.
> >> 
> >> Best regards,
> >> Bushkov E.
> > 
> > I only use RAID-0 (when I want performance and don't care about the
> > data), RAID-1 (for data I can't afford to loose) and RAID-5 (data I
> > would like to keep). I have never bothered with RAID-4.
> > 
> > What do you see in the "dmesg" after the mdadm commands?
> > It might actually mention which is the parity disk in there.
> > 
> > --
> > Joost
> 
> There's nothing special in dmesg:
> 
> md: bind<md2>
> RAID conf printout:
>  --- level:4 rd:3 wd:2
>  disk 0, o:1, dev:sdb1
>  disk 1, o:1, dev:sdc1
>  disk 2, o:1, dev:md2
> md: recovery of RAID array md1
> 
> I've run some tests with different chunk sizes, the fastest was
> raid-10(4 disks), raid-5(3 disks) was closely after. Raid-4(4 disks) was
> almost as fast as raid-5 so I don't see any sense to use it.
> 
> Best regards,
> Bushkov E.

What's the result of:
mdadm --misc --detail /dev/md1
?

Not sure what info this command will provide with a RAID-4...

--
Joost



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] mdadm and raid4
  2011-05-04  9:38         ` Joost Roeleveld
@ 2011-05-04  9:59           ` Evgeny Bushkov
  0 siblings, 0 replies; 10+ messages in thread
From: Evgeny Bushkov @ 2011-05-04  9:59 UTC (permalink / raw
  To: gentoo-user

On 04.05.2011 13:38, Joost Roeleveld wrote:
> On Wednesday 04 May 2011 13:08:34 Evgeny Bushkov wrote:
>> On 04.05.2011 11:54, Joost Roeleveld wrote:
>>> On Wednesday 04 May 2011 10:07:58 Evgeny Bushkov wrote:
>>>> On 04.05.2011 01:49, Florian Philipp wrote:
>>>>> Am 03.05.2011 19:54, schrieb Evgeny Bushkov:
>>>>>> Hi.
>>>>>> How can I find out which is the parity disk in a RAID-4 soft
>>>>>> array? I
>>>>>> couldn't find that in the mdadm manual.  I know that RAID-4
>>>>>> features a
>>>>>> dedicated parity disk that is usually the bottleneck of the array,
>>>>>> so
>>>>>> that disk must be as fast as possible. It seems useful to employ a
>>>>>> few
>>>>>> slow disks with a relatively fast disk in such a RAID-4 array.
>>>>>>
>>>>>> Best regards,
>>>>>> Bushkov E.
>>>>> You are seriously considering a RAID4? You know, there is a reason
>>>>> why
>>>>> it was superseded by RAID5. Given the way RAID4 operates, a first
>>>>> guess
>>>>> for finding the parity disk in a running array would be the one with
>>>>> the worst SMART data. It is the parity disk that dies the soonest.
>>>>>
>>>>> From looking at the source code it seems like the last specified
>>>>> disk is parity. Disclaimer: I'm no kernel hacker and I have only
>>>>> inspected the code, not tried to understand the whole MD subsystem.
>>>>>
>>>>> Regards,
>>>>> Florian Philipp
>>>> Thank you for answering... The reason I consider RAID-4 is a few
>>>> sata/150 drives  and a pair of sata II drives I've got. Let's look at
>>>> the problem from the other side: I can create RAID-0(from sata II
>>>> drives) and then add it to RAID-4 as the parity disk. It doesn't
>>>> bother
>>>> me if any disk from the RAID-0 fails, that wouldn't disrupt my RAID-4
>>>> array. For example:
>>>>
>>>> mdadm --create /dev/md1 --level=4 -n 3 -c 128 /dev/sdb1 /dev/sdc1
>>>> missing mdadm --create /dev/md2 --level=0 -n 2 -c 128 /dev/sda1
>>>> /dev/sdd1 mdadm /dev/md1 --add /dev/md2
>>>>
>>>> livecd ~ # cat /proc/mdstat
>>>> Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
>>>> md2 : active raid0 sdd1[1] sda1[0]
>>>>
>>>>       20969472 blocks super 1.2 128k chunks
>>>>
>>>> md1 : active raid4 md2[3] sdc1[1] sdb1[0]
>>>>
>>>>       20969216 blocks super 1.2 level 4, 128k chunk, algorithm 0
>>>>       [3/2] [UU_]
>>>>
>>>> [========>............]  recovery = 43.7% (4590464/10484608)
>>>> finish=1.4min speed=69615K/sec
>>>>
>>>> That configuration works well, but I'm not sure if md1 is the parity
>>>> disk here, that's why I asked. May be I'm wrong and RAID-5 is the only
>>>> worth array, I'm just trying to consider all pros and cons here.
>>>>
>>>> Best regards,
>>>> Bushkov E.
>>> I only use RAID-0 (when I want performance and don't care about the
>>> data), RAID-1 (for data I can't afford to loose) and RAID-5 (data I
>>> would like to keep). I have never bothered with RAID-4.
>>>
>>> What do you see in the "dmesg" after the mdadm commands?
>>> It might actually mention which is the parity disk in there.
>>>
>>> --
>>> Joost
>> There's nothing special in dmesg:
>>
>> md: bind<md2>
>> RAID conf printout:
>>  --- level:4 rd:3 wd:2
>>  disk 0, o:1, dev:sdb1
>>  disk 1, o:1, dev:sdc1
>>  disk 2, o:1, dev:md2
>> md: recovery of RAID array md1
>>
>> I've run some tests with different chunk sizes, the fastest was
>> raid-10(4 disks), raid-5(3 disks) was closely after. Raid-4(4 disks) was
>> almost as fast as raid-5 so I don't see any sense to use it.
>>
>> Best regards,
>> Bushkov E.
> What's the result of:
> mdadm --misc --detail /dev/md1
> ?
>
> Not sure what info this command will provide with a RAID-4...
>
> --
> Joostlivecd ~ # mdadm --misc --detail /dev/md1
livecd ~ # mdadm --misc --detail /dev/md1
/dev/md1:
        Version : 1.2
  Creation Time : Wed May  4 13:54:33 2011
     Raid Level : raid4
     Array Size : 122624 (119.77 MiB 125.57 MB)
  Used Dev Size : 61312 (59.89 MiB 62.78 MB)
   Raid Devices : 3
  Total Devices : 3
    Persistence : Superblock is persistent

    Update Time : Wed May  4 13:55:14 2011
          State : clean
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0

     Chunk Size : 128K

           Name : livecd:1  (local to host livecd)
           UUID : 654218f0:9f0b88d5:d82f39bc:ae08aa1e
         Events : 19

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       33        1      active sync   /dev/sdc1
       3       9        2        2      active sync   /dev/md2

Best regards,
Bushkov E.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] mdadm and raid4
  2011-05-04  9:08       ` Evgeny Bushkov
  2011-05-04  9:38         ` Joost Roeleveld
@ 2011-05-04 12:39         ` Florian Philipp
  2011-05-04 12:45           ` Florian Philipp
  1 sibling, 1 reply; 10+ messages in thread
From: Florian Philipp @ 2011-05-04 12:39 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 3877 bytes --]

Am 04.05.2011 11:08, schrieb Evgeny Bushkov:
> On 04.05.2011 11:54, Joost Roeleveld wrote:
>> On Wednesday 04 May 2011 10:07:58 Evgeny Bushkov wrote:
>>> On 04.05.2011 01:49, Florian Philipp wrote:
>>>> Am 03.05.2011 19:54, schrieb Evgeny Bushkov:
>>>>> Hi.
>>>>> How can I find out which is the parity disk in a RAID-4 soft array? I
>>>>> couldn't find that in the mdadm manual.  I know that RAID-4 features a
>>>>> dedicated parity disk that is usually the bottleneck of the array, so
>>>>> that disk must be as fast as possible. It seems useful to employ a few
>>>>> slow disks with a relatively fast disk in such a RAID-4 array.
>>>>>
>>>>> Best regards,
>>>>> Bushkov E.
>>>> You are seriously considering a RAID4? You know, there is a reason why
>>>> it was superseded by RAID5. Given the way RAID4 operates, a first guess
>>>> for finding the parity disk in a running array would be the one with the
>>>> worst SMART data. It is the parity disk that dies the soonest.
>>>>
>>>> From looking at the source code it seems like the last specified disk is
>>>> parity. Disclaimer: I'm no kernel hacker and I have only inspected the
>>>> code, not tried to understand the whole MD subsystem.
>>>>
>>>> Regards,
>>>> Florian Philipp
>>> Thank you for answering... The reason I consider RAID-4 is a few
>>> sata/150 drives  and a pair of sata II drives I've got. Let's look at
>>> the problem from the other side: I can create RAID-0(from sata II
>>> drives) and then add it to RAID-4 as the parity disk. It doesn't bother
>>> me if any disk from the RAID-0 fails, that wouldn't disrupt my RAID-4
>>> array. For example:
>>>
>>> mdadm --create /dev/md1 --level=4 -n 3 -c 128 /dev/sdb1 /dev/sdc1 missing
>>> mdadm --create /dev/md2 --level=0 -n 2 -c 128 /dev/sda1 /dev/sdd1
>>> mdadm /dev/md1 --add /dev/md2
>>>
>>> livecd ~ # cat /proc/mdstat
>>> Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
>>> md2 : active raid0 sdd1[1] sda1[0]
>>>       20969472 blocks super 1.2 128k chunks
>>>
>>> md1 : active raid4 md2[3] sdc1[1] sdb1[0]
>>>       20969216 blocks super 1.2 level 4, 128k chunk, algorithm 0 [3/2] [UU_]
>>> [========>............]  recovery = 43.7% (4590464/10484608) finish=1.4min
>>> speed=69615K/sec
>>>
>>> That configuration works well, but I'm not sure if md1 is the parity
>>> disk here, that's why I asked. May be I'm wrong and RAID-5 is the only
>>> worth array, I'm just trying to consider all pros and cons here.
>>>
>>> Best regards,
>>> Bushkov E.
>> I only use RAID-0 (when I want performance and don't care about the data), 
>> RAID-1 (for data I can't afford to loose) and RAID-5 (data I would like to 
>> keep). I have never bothered with RAID-4.
>>
[...]
> 
> I've run some tests with different chunk sizes, the fastest was
> raid-10(4 disks), raid-5(3 disks) was closely after. Raid-4(4 disks) was
> almost as fast as raid-5 so I don't see any sense to use it.
> 
> Best regards,
> Bushkov E.
> 
> 
> 

When you have an array with uneven disk speeds, you might consider using
the --write-mostly option of mdadm:
-W, --write-mostly
    subsequent devices lists in a --build, --create, or --add command
will be flagged as 'write-mostly'. This is valid for RAID1 only and
means that the 'md' driver will avoid reading from these devices if at
all possible. This can be useful if mirroring over a slow link.

This should help in concurrent read and write operations because the
kernel will not dispatch read requests to a disk that is already having
trouble managing the write operations.

On another point: Are you sure your disks have different speeds? SATA150
and 300 are no reliable indicator because most HDDs cannot saturate the
SATA port anyway. dd is still the most reliable way to measure
sequential throughput.

Regards,
Florian Philipp


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] mdadm and raid4
  2011-05-04 12:39         ` Florian Philipp
@ 2011-05-04 12:45           ` Florian Philipp
  2011-05-04 13:21             ` Evgeny Bushkov
  0 siblings, 1 reply; 10+ messages in thread
From: Florian Philipp @ 2011-05-04 12:45 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 4174 bytes --]

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

`man 4 md` also states that the "the last of the active devices in the
array" is the parity disk in a RAID4.

Regards,
Florian Philipp


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] mdadm and raid4
  2011-05-04 12:45           ` Florian Philipp
@ 2011-05-04 13:21             ` Evgeny Bushkov
  0 siblings, 0 replies; 10+ messages in thread
From: Evgeny Bushkov @ 2011-05-04 13:21 UTC (permalink / raw
  To: gentoo-user

On 04.05.2011 16:45, Florian Philipp wrote:
> Am 04.05.2011 14:39, schrieb Florian Philipp:
>> Am 04.05.2011 11:08, schrieb Evgeny Bushkov:
>>> On 04.05.2011 11:54, Joost Roeleveld wrote:
>>>> On Wednesday 04 May 2011 10:07:58 Evgeny Bushkov wrote:
>>>>> On 04.05.2011 01:49, Florian Philipp wrote:
>>>>>> Am 03.05.2011 19:54, schrieb Evgeny Bushkov:
>>>>>>> Hi.
>>>>>>> How can I find out which is the parity disk in a RAID-4 soft array? I
>>>>>>> couldn't find that in the mdadm manual.  I know that RAID-4 features a
>>>>>>> dedicated parity disk that is usually the bottleneck of the array, so
>>>>>>> that disk must be as fast as possible. It seems useful to employ a few
>>>>>>> slow disks with a relatively fast disk in such a RAID-4 array.
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Bushkov E.
>>>>>> You are seriously considering a RAID4? You know, there is a reason why
>>>>>> it was superseded by RAID5. Given the way RAID4 operates, a first guess
>>>>>> for finding the parity disk in a running array would be the one with the
>>>>>> worst SMART data. It is the parity disk that dies the soonest.
>>>>>>
>>>>>> From looking at the source code it seems like the last specified disk is
>>>>>> parity. Disclaimer: I'm no kernel hacker and I have only inspected the
>>>>>> code, not tried to understand the whole MD subsystem.
>>>>>>
>>>>>> Regards,
>>>>>> Florian Philipp
>>>>> Thank you for answering... The reason I consider RAID-4 is a few
>>>>> sata/150 drives  and a pair of sata II drives I've got. Let's look at
>>>>> the problem from the other side: I can create RAID-0(from sata II
>>>>> drives) and then add it to RAID-4 as the parity disk. It doesn't bother
>>>>> me if any disk from the RAID-0 fails, that wouldn't disrupt my RAID-4
>>>>> array. For example:
>>>>>
>>>>> mdadm --create /dev/md1 --level=4 -n 3 -c 128 /dev/sdb1 /dev/sdc1 missing
>>>>> mdadm --create /dev/md2 --level=0 -n 2 -c 128 /dev/sda1 /dev/sdd1
>>>>> mdadm /dev/md1 --add /dev/md2
>>>>>
>>>>> livecd ~ # cat /proc/mdstat
>>>>> Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
>>>>> md2 : active raid0 sdd1[1] sda1[0]
>>>>>       20969472 blocks super 1.2 128k chunks
>>>>>
>>>>> md1 : active raid4 md2[3] sdc1[1] sdb1[0]
>>>>>       20969216 blocks super 1.2 level 4, 128k chunk, algorithm 0 [3/2] [UU_]
>>>>> [========>............]  recovery = 43.7% (4590464/10484608) finish=1.4min
>>>>> speed=69615K/sec
>>>>>
>>>>> That configuration works well, but I'm not sure if md1 is the parity
>>>>> disk here, that's why I asked. May be I'm wrong and RAID-5 is the only
>>>>> worth array, I'm just trying to consider all pros and cons here.
>>>>>
>>>>> Best regards,
>>>>> Bushkov E.
>>>> I only use RAID-0 (when I want performance and don't care about the data), 
>>>> RAID-1 (for data I can't afford to loose) and RAID-5 (data I would like to 
>>>> keep). I have never bothered with RAID-4.
>>>>
>> [...]
>>> I've run some tests with different chunk sizes, the fastest was
>>> raid-10(4 disks), raid-5(3 disks) was closely after. Raid-4(4 disks) was
>>> almost as fast as raid-5 so I don't see any sense to use it.
>>>
>>> Best regards,
>>> Bushkov E.
>>>
>>>
>>>
>> When you have an array with uneven disk speeds, you might consider using
>> the --write-mostly option of mdadm:
>> -W, --write-mostly
>>     subsequent devices lists in a --build, --create, or --add command
>> will be flagged as 'write-mostly'. This is valid for RAID1 only and
>> means that the 'md' driver will avoid reading from these devices if at
>> all possible. This can be useful if mirroring over a slow link.
>>
>> This should help in concurrent read and write operations because the
>> kernel will not dispatch read requests to a disk that is already having
>> trouble managing the write operations.
>>
>> On another point: Are you sure your disks have different speeds? SATA150
>> and 300 are no reliable indicator because most HDDs cannot saturate the
>> SATA port anyway. dd is still the most reliable way to measure
>> sequential throughput.
>>
>> Regards,
>> Florian Philipp
>>
> `man 4 md` also states that the "the last of the active devices in the
> array" is the parity disk in a RAID4.
>
> Regards,
> Florian Philipp
>
Thank you, that's what I was searching for. It seems I configured my
RAID-4 right. Nonetheless that array wasn't better than RAID-5. Finally
I created RAID-5 (two sataII drives and 1 sata/150) with lvm.
From a test "time dd if=/dev/zero of=/mnt/gentoo/bigfile bs=1M
count=3000" I've got 163 MB/s. That in any way better than my 1-disk
system(46.7 MB/s from the same test) that I've been using.
As regard interfaces speeds I ran hdparm command and got:
livecd src # hdparm -i /dev/sd[abd]|grep UDMA     
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6
So you are right, all the drives seem to utilize the same interface speed.

Best regards,
Bushkov E.





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-05-04 13:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-03 17:54 [gentoo-user] mdadm and raid4 Evgeny Bushkov
2011-05-03 21:49 ` Florian Philipp
2011-05-04  6:07   ` Evgeny Bushkov
2011-05-04  7:54     ` Joost Roeleveld
2011-05-04  9:08       ` Evgeny Bushkov
2011-05-04  9:38         ` Joost Roeleveld
2011-05-04  9:59           ` Evgeny Bushkov
2011-05-04 12:39         ` Florian Philipp
2011-05-04 12:45           ` Florian Philipp
2011-05-04 13:21             ` Evgeny Bushkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox