linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RAID1 On 3 Drives
@ 2010-03-13 21:06 Carlos Mennens
  2010-03-13 21:21 ` Majed B.
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Carlos Mennens @ 2010-03-13 21:06 UTC (permalink / raw)
  To: Mdadm

I was told by my distributions Wiki page that Grub doesn't support
RAID 5 or RAID 6 so I would need to create a volume with three disks
and set the level to RAID 1:

# mdadm --create /dev/md1 --level=1 --raid-devices=3 /dev/sda1
/dev/sdb1 /dev/sdc1 --spare-devices=1 /dev/sdd1

Is this possible to mirror three identical drive partitions? I was
talking to some co-workers and was told that I could only pair two
drives on RAID 1.

Can anyone please help me understand this?

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

* Re: RAID1 On 3 Drives
  2010-03-13 21:06 RAID1 On 3 Drives Carlos Mennens
@ 2010-03-13 21:21 ` Majed B.
  2010-03-13 21:24   ` Carlos Mennens
  2010-03-13 21:45   ` Neil Brown
  2010-03-13 21:26 ` Neil Brown
  2010-03-14  1:22 ` thib
  2 siblings, 2 replies; 19+ messages in thread
From: Majed B. @ 2010-03-13 21:21 UTC (permalink / raw)
  To: LinuxRaid

RAID is called mirror: You need 2 drives: The original and the mirror.

You can make a RAID1 array of 2 disks + 1 spare if you wish.

On Sun, Mar 14, 2010 at 12:06 AM, Carlos Mennens <carloswill@gmail.com> wrote:
> I was told by my distributions Wiki page that Grub doesn't support
> RAID 5 or RAID 6 so I would need to create a volume with three disks
> and set the level to RAID 1:
>
> # mdadm --create /dev/md1 --level=1 --raid-devices=3 /dev/sda1
> /dev/sdb1 /dev/sdc1 --spare-devices=1 /dev/sdd1
>
> Is this possible to mirror three identical drive partitions? I was
> talking to some co-workers and was told that I could only pair two
> drives on RAID 1.
>
> Can anyone please help me understand this?
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
       Majed B.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: RAID1 On 3 Drives
  2010-03-13 21:21 ` Majed B.
@ 2010-03-13 21:24   ` Carlos Mennens
  2010-03-14 21:09     ` Luca Berra
  2010-03-13 21:45   ` Neil Brown
  1 sibling, 1 reply; 19+ messages in thread
From: Carlos Mennens @ 2010-03-13 21:24 UTC (permalink / raw)
  To: Mdadm

On Sat, Mar 13, 2010 at 4:21 PM, Majed B. <majedb@gmail.com> wrote:
> RAID is called mirror: You need 2 drives: The original and the mirror.
>
> You can make a RAID1 array of 2 disks + 1 spare if you wish.

So the WIki on RAID configuration is incorrect, right?

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

* Re: RAID1 On 3 Drives
  2010-03-13 21:06 RAID1 On 3 Drives Carlos Mennens
  2010-03-13 21:21 ` Majed B.
@ 2010-03-13 21:26 ` Neil Brown
  2010-03-13 21:31   ` Majed B.
  2010-03-14  1:22 ` thib
  2 siblings, 1 reply; 19+ messages in thread
From: Neil Brown @ 2010-03-13 21:26 UTC (permalink / raw)
  To: Carlos Mennens; +Cc: Mdadm

On Sat, 13 Mar 2010 16:06:38 -0500
Carlos Mennens <carloswill@gmail.com> wrote:

> I was told by my distributions Wiki page that Grub doesn't support
> RAID 5 or RAID 6 so I would need to create a volume with three disks
> and set the level to RAID 1:
> 
> # mdadm --create /dev/md1 --level=1 --raid-devices=3 /dev/sda1
> /dev/sdb1 /dev/sdc1 --spare-devices=1 /dev/sdd1
> 
> Is this possible to mirror three identical drive partitions? I was
> talking to some co-workers and was told that I could only pair two
> drives on RAID 1.

Your co-workers are wrong, at least for md raid.  With md, a RAID1 can have
any number of devices from 1 upwards - the limit varies in different
situations but is at least 28.

Try it and see.

NeilBrown

> 
> Can anyone please help me understand this?
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* Re: RAID1 On 3 Drives
  2010-03-13 21:26 ` Neil Brown
@ 2010-03-13 21:31   ` Majed B.
  2010-03-13 21:50     ` Neil Brown
  0 siblings, 1 reply; 19+ messages in thread
From: Majed B. @ 2010-03-13 21:31 UTC (permalink / raw)
  To: LinuxRaid

Neil,

Since when was this possible? I always thought that it had to have an
even number of disks.

On Sun, Mar 14, 2010 at 12:26 AM, Neil Brown <neilb@suse.de> wrote:
> On Sat, 13 Mar 2010 16:06:38 -0500
> Carlos Mennens <carloswill@gmail.com> wrote:
>
>> I was told by my distributions Wiki page that Grub doesn't support
>> RAID 5 or RAID 6 so I would need to create a volume with three disks
>> and set the level to RAID 1:
>>
>> # mdadm --create /dev/md1 --level=1 --raid-devices=3 /dev/sda1
>> /dev/sdb1 /dev/sdc1 --spare-devices=1 /dev/sdd1
>>
>> Is this possible to mirror three identical drive partitions? I was
>> talking to some co-workers and was told that I could only pair two
>> drives on RAID 1.
>
> Your co-workers are wrong, at least for md raid.  With md, a RAID1 can have
> any number of devices from 1 upwards - the limit varies in different
> situations but is at least 28.
>
> Try it and see.
>
> NeilBrown
>
>>
>> Can anyone please help me understand this?
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
       Majed B.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: RAID1 On 3 Drives
  2010-03-13 21:21 ` Majed B.
  2010-03-13 21:24   ` Carlos Mennens
@ 2010-03-13 21:45   ` Neil Brown
  1 sibling, 0 replies; 19+ messages in thread
From: Neil Brown @ 2010-03-13 21:45 UTC (permalink / raw)
  To: Majed B.; +Cc: LinuxRaid

On Sun, 14 Mar 2010 00:21:06 +0300
"Majed B." <majedb@gmail.com> wrote:

> RAID is called mirror: You need 2 drives: The original and the mirror.
> 
> You can make a RAID1 array of 2 disks + 1 spare if you wish.

On what do you base this (false) assertion?   If there is something
in the md documentation that suggests this I would like to get
it fixed.

NeilBrown

> 
> On Sun, Mar 14, 2010 at 12:06 AM, Carlos Mennens <carloswill@gmail.com> wrote:
> > I was told by my distributions Wiki page that Grub doesn't support
> > RAID 5 or RAID 6 so I would need to create a volume with three disks
> > and set the level to RAID 1:
> >
> > # mdadm --create /dev/md1 --level=1 --raid-devices=3 /dev/sda1
> > /dev/sdb1 /dev/sdc1 --spare-devices=1 /dev/sdd1
> >
> > Is this possible to mirror three identical drive partitions? I was
> > talking to some co-workers and was told that I could only pair two
> > drives on RAID 1.
> >
> > Can anyone please help me understand this?
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> 
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: RAID1 On 3 Drives
  2010-03-13 21:31   ` Majed B.
@ 2010-03-13 21:50     ` Neil Brown
  2010-03-14  3:30       ` Majed B.
  0 siblings, 1 reply; 19+ messages in thread
From: Neil Brown @ 2010-03-13 21:50 UTC (permalink / raw)
  To: Majed B.; +Cc: LinuxRaid

On Sun, 14 Mar 2010 00:31:01 +0300
"Majed B." <majedb@gmail.com> wrote:

> Neil,
> 
> Since when was this possible? I always thought that it had to have an
> even number of disks.

md has never imposed a 2-drive restriction on raid1.  That would be fairly
pointless.

Requiring an even number of devices would also be pointless.

The term "mirror" is possibly a cause of confusion as it suggests an original
and a copy.  It also suggests that the copy is reflected in some way.
Neither of these are true.
RAID1 stores multiple copies of the same data.  All copies are equal.  You can
have as many or as few of them as you like.  1, 2, 3, 4, ....
NeilBrown


> 
> On Sun, Mar 14, 2010 at 12:26 AM, Neil Brown <neilb@suse.de> wrote:
> > On Sat, 13 Mar 2010 16:06:38 -0500
> > Carlos Mennens <carloswill@gmail.com> wrote:
> >
> >> I was told by my distributions Wiki page that Grub doesn't support
> >> RAID 5 or RAID 6 so I would need to create a volume with three disks
> >> and set the level to RAID 1:
> >>
> >> # mdadm --create /dev/md1 --level=1 --raid-devices=3 /dev/sda1
> >> /dev/sdb1 /dev/sdc1 --spare-devices=1 /dev/sdd1
> >>
> >> Is this possible to mirror three identical drive partitions? I was
> >> talking to some co-workers and was told that I could only pair two
> >> drives on RAID 1.
> >
> > Your co-workers are wrong, at least for md raid.  With md, a RAID1 can have
> > any number of devices from 1 upwards - the limit varies in different
> > situations but is at least 28.
> >
> > Try it and see.
> >
> > NeilBrown
> >
> >>
> >> Can anyone please help me understand this?
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> 
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: RAID1 On 3 Drives
@ 2010-03-13 22:30 Joachim Otahal
  2010-03-13 23:18 ` Carlos Mennens
  0 siblings, 1 reply; 19+ messages in thread
From: Joachim Otahal @ 2010-03-13 22:30 UTC (permalink / raw)
  To: linux-raid

On Sun, Mar 14, 2010 at 12:06 AM, Carlos Mennens<carloswill@gmail.com>  wrote:
>  I was told by my distributions Wiki page that Grub doesn't support
>  RAID 5 or RAID 6 so I would need to create a volume with three disks
>  and set the level to RAID 1:
>
>  # mdadm --create /dev/md1 --level=1 --raid-devices=3 /dev/sda1
>  /dev/sdb1 /dev/sdc1 --spare-devices=1 /dev/sdd1
>
>  Is this possible to mirror three identical drive partitions? I was
>  talking to some co-workers and was told that I could only pair two
>  drives on RAID 1.
>
>  Can anyone please help me understand this?

/boot must be RAID1 (or a normal partition), everything else can be RAIDwhatever. Grub has no problems reading /boot from a mirrors.

It is possible to make RAID1 to use more than two drives and keep the all active. In your case it is a matter of "believe" whether a spare is better or actually using all four actively in your raid, I prefer the latter.
I have heavily tested more than two only with files via loopback yet, two drive, three drives, four drives and more. It does work, the testfile generated out of urandom kept the correct hash value throughout all my sick testings.
The quick test with three SATA drives worked too, but it was just for the fun to see whether grub pukes or works (works if you don't forget the grub setup for drive 2, 3 etc).
My plan is: Use RAID1 with 4 drives (quad-mirroring) for /boot or / and raid10 or raid5 for the data upon my next linux server upgrade.

Joachim Otahal



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

* Re: RAID1 On 3 Drives
  2010-03-13 22:30 Joachim Otahal
@ 2010-03-13 23:18 ` Carlos Mennens
  2010-03-13 23:50   ` Bill Davidsen
  0 siblings, 1 reply; 19+ messages in thread
From: Carlos Mennens @ 2010-03-13 23:18 UTC (permalink / raw)
  To: Mdadm

I am glad I asked! Thanks for all the info. Now my question next is if
I am creating a 3 disk raid with a 1 disk spare, do I need to use any
special 'mdadm' parameters besides what u see below for /boot (Grub)?

# mdadm --create /dev/md0 --level=1 --raid-devices=3 /dev/sda1
/dev/sdb1 /dev/sdc1 --spare-devices=1 /dev/sdd1

Anything else I should add to the above command for my /boot partition?

On 3/13/10, Joachim Otahal <Jou@gmx.net> wrote:
> On Sun, Mar 14, 2010 at 12:06 AM, Carlos Mennens<carloswill@gmail.com>
> wrote:
>>  I was told by my distributions Wiki page that Grub doesn't support
>>  RAID 5 or RAID 6 so I would need to create a volume with three disks
>>  and set the level to RAID 1:
>>
>>  # mdadm --create /dev/md1 --level=1 --raid-devices=3 /dev/sda1
>>  /dev/sdb1 /dev/sdc1 --spare-devices=1 /dev/sdd1
>>
>>  Is this possible to mirror three identical drive partitions? I was
>>  talking to some co-workers and was told that I could only pair two
>>  drives on RAID 1.
>>
>>  Can anyone please help me understand this?
>
> /boot must be RAID1 (or a normal partition), everything else can be
> RAIDwhatever. Grub has no problems reading /boot from a mirrors.
>
> It is possible to make RAID1 to use more than two drives and keep the all
> active. In your case it is a matter of "believe" whether a spare is better
> or actually using all four actively in your raid, I prefer the latter.
> I have heavily tested more than two only with files via loopback yet, two
> drive, three drives, four drives and more. It does work, the testfile
> generated out of urandom kept the correct hash value throughout all my sick
> testings.
> The quick test with three SATA drives worked too, but it was just for the
> fun to see whether grub pukes or works (works if you don't forget the grub
> setup for drive 2, 3 etc).
> My plan is: Use RAID1 with 4 drives (quad-mirroring) for /boot or / and
> raid10 or raid5 for the data upon my next linux server upgrade.
>
> Joachim Otahal
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

-- 
Sent from my mobile device

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

* Re: RAID1 On 3 Drives
  2010-03-13 23:18 ` Carlos Mennens
@ 2010-03-13 23:50   ` Bill Davidsen
  2010-03-15 12:30     ` Carlos Mennens
  0 siblings, 1 reply; 19+ messages in thread
From: Bill Davidsen @ 2010-03-13 23:50 UTC (permalink / raw)
  To: Carlos Mennens; +Cc: Mdadm

Carlos Mennens wrote:
> I am glad I asked! Thanks for all the info. Now my question next is if
> I am creating a 3 disk raid with a 1 disk spare, do I need to use any
> special 'mdadm' parameters besides what u see below for /boot (Grub)?
>
> # mdadm --create /dev/md0 --level=1 --raid-devices=3 /dev/sda1
> /dev/sdb1 /dev/sdc1 --spare-devices=1 /dev/sdd1
>
> Anything else I should add to the above command for my /boot partition?
>   

Having a spare on raid-1 is fairly pointless, it hurts performance and 
buys you nothing. Having one more copy of the data built and ready 
serves you better.

-- 
Bill Davidsen <davidsen@tmr.com>
  "We can't solve today's problems by using the same thinking we
   used in creating them." - Einstein


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

* Re: RAID1 On 3 Drives
  2010-03-13 21:06 RAID1 On 3 Drives Carlos Mennens
  2010-03-13 21:21 ` Majed B.
  2010-03-13 21:26 ` Neil Brown
@ 2010-03-14  1:22 ` thib
  2 siblings, 0 replies; 19+ messages in thread
From: thib @ 2010-03-14  1:22 UTC (permalink / raw)
  To: Mdadm

Carlos Mennens wrote:
> I was told by my distributions Wiki page that Grub doesn't support
> RAID 5 or RAID 6 so [...]

I suppose you're stuck with grub1 but you might want to know that grub2 is 
doing fine[1], in case you hear about an upgrade coming.

[1] http://grub.enbug.org/LVMandRAID

-thib

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

* Re: RAID1 On 3 Drives
  2010-03-13 21:50     ` Neil Brown
@ 2010-03-14  3:30       ` Majed B.
  0 siblings, 0 replies; 19+ messages in thread
From: Majed B. @ 2010-03-14  3:30 UTC (permalink / raw)
  To: Neil Brown; +Cc: LinuxRaid

Thank you Neil for the valuable clarification :)

On Sun, Mar 14, 2010 at 12:50 AM, Neil Brown <neilb@suse.de> wrote:
> On Sun, 14 Mar 2010 00:31:01 +0300
> "Majed B." <majedb@gmail.com> wrote:
>
>> Neil,
>>
>> Since when was this possible? I always thought that it had to have an
>> even number of disks.
>
> md has never imposed a 2-drive restriction on raid1.  That would be fairly
> pointless.
>
> Requiring an even number of devices would also be pointless.
>
> The term "mirror" is possibly a cause of confusion as it suggests an original
> and a copy.  It also suggests that the copy is reflected in some way.
> Neither of these are true.
> RAID1 stores multiple copies of the same data.  All copies are equal.  You can
> have as many or as few of them as you like.  1, 2, 3, 4, ....
> NeilBrown
>
>
>>
>> On Sun, Mar 14, 2010 at 12:26 AM, Neil Brown <neilb@suse.de> wrote:
>> > On Sat, 13 Mar 2010 16:06:38 -0500
>> > Carlos Mennens <carloswill@gmail.com> wrote:
>> >
>> >> I was told by my distributions Wiki page that Grub doesn't support
>> >> RAID 5 or RAID 6 so I would need to create a volume with three disks
>> >> and set the level to RAID 1:
>> >>
>> >> # mdadm --create /dev/md1 --level=1 --raid-devices=3 /dev/sda1
>> >> /dev/sdb1 /dev/sdc1 --spare-devices=1 /dev/sdd1
>> >>
>> >> Is this possible to mirror three identical drive partitions? I was
>> >> talking to some co-workers and was told that I could only pair two
>> >> drives on RAID 1.
>> >
>> > Your co-workers are wrong, at least for md raid.  With md, a RAID1 can have
>> > any number of devices from 1 upwards - the limit varies in different
>> > situations but is at least 28.
>> >
>> > Try it and see.
>> >
>> > NeilBrown
>> >
>> >>
>> >> Can anyone please help me understand this?
>> >> --
>> >> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>> >> the body of a message to majordomo@vger.kernel.org
>> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> >
>> > --
>> > To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>> > the body of a message to majordomo@vger.kernel.org
>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> >
>>
>>
>>
>
>



-- 
       Majed B.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: RAID1 On 3 Drives
  2010-03-13 21:24   ` Carlos Mennens
@ 2010-03-14 21:09     ` Luca Berra
  0 siblings, 0 replies; 19+ messages in thread
From: Luca Berra @ 2010-03-14 21:09 UTC (permalink / raw)
  To: Mdadm

On Sat, Mar 13, 2010 at 04:24:33PM -0500, Carlos Mennens wrote:
>On Sat, Mar 13, 2010 at 4:21 PM, Majed B. <majedb@gmail.com> wrote:
>> RAID is called mirror: You need 2 drives: The original and the mirror.
>>
>> You can make a RAID1 array of 2 disks + 1 spare if you wish.
>
>So the WIki on RAID configuration is incorrect, right?
how comes my home server as a raid1 /boot made of four (4) drives ?

L.

-- 
Luca Berra -- bluca@comedia.it
         Communication Media & Services S.r.l.
  /"\
  \ /     ASCII RIBBON CAMPAIGN
   X        AGAINST HTML MAIL
  / \

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

* Re: RAID1 On 3 Drives
  2010-03-13 23:50   ` Bill Davidsen
@ 2010-03-15 12:30     ` Carlos Mennens
  2010-03-15 12:48       ` Majed B.
  2010-03-20 16:08       ` Bill Davidsen
  0 siblings, 2 replies; 19+ messages in thread
From: Carlos Mennens @ 2010-03-15 12:30 UTC (permalink / raw)
  To: Mdadm

On Sat, Mar 13, 2010 at 6:50 PM, Bill Davidsen <davidsen@tmr.com> wrote:
> Having a spare on raid-1 is fairly pointless, it hurts performance and buys
> you nothing. Having one more copy of the data built and ready serves you
> better.

Can you explain this as I find this interesting. How does having a
/boot partition on 3 drives with 1 spare hurt performance? Are you
saying that I would get better drive performance if I had all 4 disk
partitions active members of my RAID1 /boot? I just don't understand
how the 4th disk doing nothing but acting as a spare would hinder
performance.

Secondly, if the above statement also applies to my / partition? Would
you suggest using all 4 drives as active partitions in a RAID5 array
too? If I have a 3 disk RAID5 and one hot spare, do you think I would
get less performance value for my configuration?

Thanks for the clarification!

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

* Re: RAID1 On 3 Drives
  2010-03-15 12:30     ` Carlos Mennens
@ 2010-03-15 12:48       ` Majed B.
  2010-03-15 14:47         ` Carlos Mennens
  2010-03-20 16:08       ` Bill Davidsen
  1 sibling, 1 reply; 19+ messages in thread
From: Majed B. @ 2010-03-15 12:48 UTC (permalink / raw)
  To: LinuxRaid

Carlos,

Choosing your RAID setup depends on the purpose of your machine. Is it
a web server, file server, archive, mail, video storage, ...etc.?

/boot is only used during boot up. Having a spare on stand by or not
does not affect performance, except in the case a disk dies; in that
case, the hot spare is engaged and becomes an active disk at which the
array starts to resync the data to this new disk. During resyncing,
performance will be degraded.

Including all disks in the array (no spare) means data is being
written in parallel to all disks at all times. You'd still have to
replace a dead disk and add it to the array and it will still have to
resync.

As for your RAID5 question: I think if your usage of the server is
write-mostly, you may find it to have better performance with 3 disks
rather 4. If it's read-mostly, then 4 disks should perform better.

If you have physical access to the machine, try both cases. Setting
them up won't take more than 5-10 minutes. Benchmarking wouldn't take
more than 15 minutes in each setup.

Remember, there are parameters to fine-tune: NCQ, read-ahead, noatime,
nodiratime, chunksize, ...etc.

On Mon, Mar 15, 2010 at 3:30 PM, Carlos Mennens <carloswill@gmail.com> wrote:
> On Sat, Mar 13, 2010 at 6:50 PM, Bill Davidsen <davidsen@tmr.com> wrote:
>> Having a spare on raid-1 is fairly pointless, it hurts performance and buys
>> you nothing. Having one more copy of the data built and ready serves you
>> better.
>
> Can you explain this as I find this interesting. How does having a
> /boot partition on 3 drives with 1 spare hurt performance? Are you
> saying that I would get better drive performance if I had all 4 disk
> partitions active members of my RAID1 /boot? I just don't understand
> how the 4th disk doing nothing but acting as a spare would hinder
> performance.
>
> Secondly, if the above statement also applies to my / partition? Would
> you suggest using all 4 drives as active partitions in a RAID5 array
> too? If I have a 3 disk RAID5 and one hot spare, do you think I would
> get less performance value for my configuration?
>
> Thanks for the clarification!
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
       Majed B.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: RAID1 On 3 Drives
  2010-03-15 12:48       ` Majed B.
@ 2010-03-15 14:47         ` Carlos Mennens
  2010-03-15 16:05           ` Majed B.
  0 siblings, 1 reply; 19+ messages in thread
From: Carlos Mennens @ 2010-03-15 14:47 UTC (permalink / raw)
  To: Mdadm

On Mon, Mar 15, 2010 at 7:48 AM, Majed B. <majedb@gmail.com> wrote:
> Carlos,
>
> Choosing your RAID setup depends on the purpose of your machine. Is it
> a web server, file server, archive, mail, video storage, ...etc.

Basically this is my everyday workstation that I keep everything on.
It's not hosting Apache or MySQL or anything like that. Just my
everyday workstation.

> /boot is only used during boot up. Having a spare on stand by or not
> does not affect performance, except in the case a disk dies; in that
> case, the hot spare is engaged and becomes an active disk at which the
> array starts to resync the data to this new disk. During resyncing,
> performance will be degraded.

Oh, I was wondering why Bill noted previously that a spare would hurt
performance but based on your info above, this is only if a drive
fails and then the spare starts to synchronize. I hope that is what
Bill meant.

> As for your RAID5 question: I think if your usage of the server is
> write-mostly, you may find it to have better performance with 3 disks
> rather 4. If it's read-mostly, then 4 disks should perform better.
>
> If you have physical access to the machine, try both cases. Setting
> them up won't take more than 5-10 minutes. Benchmarking wouldn't take
> more than 15 minutes in each setup.
>
> Remember, there are parameters to fine-tune: NCQ, read-ahead, noatime,
> nodiratime, chunksize, ...etc.

I do have access to the machine as it's my new Desktop PC I am
building today at some point. I just wanted to get some expert advise
on how I should proceed. For now I am going to use all 4 disks with no
spares.

I just don't know enough about fine tuning and how it could benefit or
hinder disk performance for my setup so I guess I will omit them until
I can understand what to use for what function. If you guys have any
suggestions for what parameters to use for /boot, /, or swap...please
feel free to chime in.

Thanks all!

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

* Re: RAID1 On 3 Drives
  2010-03-15 14:47         ` Carlos Mennens
@ 2010-03-15 16:05           ` Majed B.
  2010-03-16  1:46             ` Keld Simonsen
  0 siblings, 1 reply; 19+ messages in thread
From: Majed B. @ 2010-03-15 16:05 UTC (permalink / raw)
  To: LinuxRaid

100-200 MB is good enough for the /boot filesystem.

How much swap to use depends on how much RAM you have and how much RAM
the applications you use demand.
If you have 4GB RAM or more, and most of your usage is about browsing
the Internet, documents, watching videos, ..etc., then 2GB swap is
more than enough even though I think you'll never use it.
In case you ever need more than that, you could also create a
swap-file -- whenever in need, create the file with the size you need
on your array, activate the file as swap and that's it! When done with
it, deactivated and delete the file to reclaim the capacity it once
occupied.

Personally, I keep my /home on its own partition. This guarantees that
whatever system upgrades or distribution installs occur, /home won't
be affected nor touched, and can be seen by multiple Linux distros if
you're into multi-booting.

I have a workstation with 4x 320GB disks with my root filesystem on it
as RAID5. I have to say that it wasn't a good judgment going that way.
One time one of the disks failed and the system refused to boot in
degraded mode, so I had to boot from a CD, resync the array and then
boot normally.
That event got me thinking: Why don't I put / on its own disk and
/home be on the RAID5 array. I could copy / to the array as a backup,
should the OS disk crash; put a new disk, make it bootable, install
grub on it, then using a LiveCD I could boot and access my RAID5 array
and copy the OS files back.

It's OK to have all disks running on the array without a spare. Just
make sure you configure smartd and have it run tests on a daily basis
(short tests) and a weekly basis (long tests) and to have it email you
if problems occur.

For RAID performance enhancements, the page seem to have been removed
but a cached version of it is available:
http://74.125.77.132/search?q=cache:5f7lyJQGL78J:www.linuxfoundation.org/collaborate/workgroups/linux-raid/performance+http://linux-raid.osdl.org/index.php/Performance&cd=1&hl=en&ct=clnk

For RAID benchmarks:
https://turing.phas.ubc.ca/mediawiki/index.php/RAID_benchmarks
http://peterkieser.com/2009/11/27/linux-raid-mdraid-raid6-raid5-benchmarks/

I hope these help.

On Mon, Mar 15, 2010 at 5:47 PM, Carlos Mennens <carloswill@gmail.com> wrote:
> On Mon, Mar 15, 2010 at 7:48 AM, Majed B. <majedb@gmail.com> wrote:
>> Carlos,
>>
>> Choosing your RAID setup depends on the purpose of your machine. Is it
>> a web server, file server, archive, mail, video storage, ...etc.
>
> Basically this is my everyday workstation that I keep everything on.
> It's not hosting Apache or MySQL or anything like that. Just my
> everyday workstation.
>
>> /boot is only used during boot up. Having a spare on stand by or not
>> does not affect performance, except in the case a disk dies; in that
>> case, the hot spare is engaged and becomes an active disk at which the
>> array starts to resync the data to this new disk. During resyncing,
>> performance will be degraded.
>
> Oh, I was wondering why Bill noted previously that a spare would hurt
> performance but based on your info above, this is only if a drive
> fails and then the spare starts to synchronize. I hope that is what
> Bill meant.
>
>> As for your RAID5 question: I think if your usage of the server is
>> write-mostly, you may find it to have better performance with 3 disks
>> rather 4. If it's read-mostly, then 4 disks should perform better.
>>
>> If you have physical access to the machine, try both cases. Setting
>> them up won't take more than 5-10 minutes. Benchmarking wouldn't take
>> more than 15 minutes in each setup.
>>
>> Remember, there are parameters to fine-tune: NCQ, read-ahead, noatime,
>> nodiratime, chunksize, ...etc.
>
> I do have access to the machine as it's my new Desktop PC I am
> building today at some point. I just wanted to get some expert advise
> on how I should proceed. For now I am going to use all 4 disks with no
> spares.
>
> I just don't know enough about fine tuning and how it could benefit or
> hinder disk performance for my setup so I guess I will omit them until
> I can understand what to use for what function. If you guys have any
> suggestions for what parameters to use for /boot, /, or swap...please
> feel free to chime in.
>
> Thanks all!
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
       Majed B.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: RAID1 On 3 Drives
  2010-03-15 16:05           ` Majed B.
@ 2010-03-16  1:46             ` Keld Simonsen
  0 siblings, 0 replies; 19+ messages in thread
From: Keld Simonsen @ 2010-03-16  1:46 UTC (permalink / raw)
  To: Majed B.; +Cc: LinuxRaid

On Mon, Mar 15, 2010 at 07:05:17PM +0300, Majed B. wrote:
> 100-200 MB is good enough for the /boot filesystem.
> 
> How much swap to use depends on how much RAM you have and how much RAM
> the applications you use demand.
> If you have 4GB RAM or more, and most of your usage is about browsing
> the Internet, documents, watching videos, ..etc., then 2GB swap is
> more than enough even though I think you'll never use it.
> In case you ever need more than that, you could also create a
> swap-file -- whenever in need, create the file with the size you need
> on your array, activate the file as swap and that's it! When done with
> it, deactivated and delete the file to reclaim the capacity it once
> occupied.
> 
> Personally, I keep my /home on its own partition. This guarantees that
> whatever system upgrades or distribution installs occur, /home won't
> be affected nor touched, and can be seen by multiple Linux distros if
> you're into multi-booting.
> 
> I have a workstation with 4x 320GB disks with my root filesystem on it
> as RAID5. I have to say that it wasn't a good judgment going that way.
> One time one of the disks failed and the system refused to boot in
> degraded mode, so I had to boot from a CD, resync the array and then
> boot normally.
> That event got me thinking: Why don't I put / on its own disk and
> /home be on the RAID5 array. I could copy / to the array as a backup,
> should the OS disk crash; put a new disk, make it bootable, install
> grub on it, then using a LiveCD I could boot and access my RAID5 array
> and copy the OS files back.
> 
> It's OK to have all disks running on the array without a spare. Just
> make sure you configure smartd and have it run tests on a daily basis
> (short tests) and a weekly basis (long tests) and to have it email you
> if problems occur.
> 
> For RAID performance enhancements, the page seem to have been removed
> but a cached version of it is available:
> http://74.125.77.132/search?q=cache:5f7lyJQGL78J:www.linuxfoundation.org/collaborate/workgroups/linux-raid/performance+http://linux-raid.osdl.org/index.php/Performance&cd=1&hl=en&ct=clnk

Our wiki moved ... see
http://raid.wiki.kernel.org/index.php/Performance

> 
> For RAID benchmarks:
> https://turing.phas.ubc.ca/mediawiki/index.php/RAID_benchmarks

does not involve Linux MD RAID. Linux MD RAID is generally faster then
HW RAID.

Best regards
keld

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

* Re: RAID1 On 3 Drives
  2010-03-15 12:30     ` Carlos Mennens
  2010-03-15 12:48       ` Majed B.
@ 2010-03-20 16:08       ` Bill Davidsen
  1 sibling, 0 replies; 19+ messages in thread
From: Bill Davidsen @ 2010-03-20 16:08 UTC (permalink / raw)
  To: Carlos Mennens; +Cc: Mdadm

Carlos Mennens wrote:
> On Sat, Mar 13, 2010 at 6:50 PM, Bill Davidsen <davidsen@tmr.com> wrote:
>   
>> Having a spare on raid-1 is fairly pointless, it hurts performance and buys
>> you nothing. Having one more copy of the data built and ready serves you
>> better.
>>     
>
> Can you explain this as I find this interesting. How does having a
> /boot partition on 3 drives with 1 spare hurt performance? Are you
> saying that I would get better drive performance if I had all 4 disk
> partitions active members of my RAID1 /boot? I just don't understand
> how the 4th disk doing nothing but acting as a spare would hinder
> performance.
>
>   
In RAID-1 any drive which is a member of the array is already a spare, 
they are all the same. So if a drive failed you would just stop using 
it. Having a spare makes no sense, since the spare would be rebuilt 
using the same data it would have contained as a member of the array. 
Note that while the "spare" is being rebuilt the array will be quite 
busy and response will be poor, not an issue if /boot is the only thing 
on the drives, but more of an issue if the array just uses partitions 
and the thrashing of a spare rebuild slows other arrays on the same drives.

Finally, RAID-1 supposedly will read from an unbusy drive if there are 
multiple reads against the array, allowing overlapping of seek and 
transfer. That's only an issue for /boot if you are trying for a ten 
second boot time, but it applies to all RAID-1 arrays.

> Secondly, if the above statement also applies to my / partition? Would
> you suggest using all 4 drives as active partitions in a RAID5 array
> too? If I have a 3 disk RAID5 and one hot spare, do you think I would
> get less performance value for my configuration?
>   

No, because the drives are not all the same, so you can't keep a copy of 
just the drive ready to fail next. For RAID-[456&10] you want at least 
one spare for reliability and fast return to full performance.

Ask again if I didn't give enough detail.

-- 
Bill Davidsen <davidsen@tmr.com>
  "We can't solve today's problems by using the same thinking we
   used in creating them." - Einstein


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

end of thread, other threads:[~2010-03-20 16:08 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-13 21:06 RAID1 On 3 Drives Carlos Mennens
2010-03-13 21:21 ` Majed B.
2010-03-13 21:24   ` Carlos Mennens
2010-03-14 21:09     ` Luca Berra
2010-03-13 21:45   ` Neil Brown
2010-03-13 21:26 ` Neil Brown
2010-03-13 21:31   ` Majed B.
2010-03-13 21:50     ` Neil Brown
2010-03-14  3:30       ` Majed B.
2010-03-14  1:22 ` thib
  -- strict thread matches above, loose matches on Subject: below --
2010-03-13 22:30 Joachim Otahal
2010-03-13 23:18 ` Carlos Mennens
2010-03-13 23:50   ` Bill Davidsen
2010-03-15 12:30     ` Carlos Mennens
2010-03-15 12:48       ` Majed B.
2010-03-15 14:47         ` Carlos Mennens
2010-03-15 16:05           ` Majed B.
2010-03-16  1:46             ` Keld Simonsen
2010-03-20 16:08       ` Bill Davidsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).