linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mdadm + raid1 of 2 disks and now need to add more
@ 2006-04-11 14:41 Shai
  2006-04-11 14:51 ` Andy Smith
  2006-04-12  7:18 ` Shai
  0 siblings, 2 replies; 11+ messages in thread
From: Shai @ 2006-04-11 14:41 UTC (permalink / raw)
  To: linux-raid

Hi,

I have two SCSI disks on raid1.
Since I have lots of reads from that raid, I want to add two more
disks to this raid so that read will be faster.

How should I add the new disks?

Shai

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

* Re: mdadm + raid1 of 2 disks and now need to add more
  2006-04-11 14:41 mdadm + raid1 of 2 disks and now need to add more Shai
@ 2006-04-11 14:51 ` Andy Smith
  2006-04-11 17:25   ` Laurent CARON
  2006-04-12  7:18 ` Shai
  1 sibling, 1 reply; 11+ messages in thread
From: Andy Smith @ 2006-04-11 14:51 UTC (permalink / raw)
  To: linux-raid

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

On Tue, Apr 11, 2006 at 04:41:30PM +0200, Shai wrote:
> I have two SCSI disks on raid1.
> Since I have lots of reads from that raid, I want to add two more
> disks to this raid so that read will be faster.
> 
> How should I add the new disks?

Is this possible with md currently:

Create a RAID-10 on the two new disks specifying one disk missing
from each mirror.

Then copy data over and add the two existing disks letting it
resync?

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: mdadm + raid1 of 2 disks and now need to add more
  2006-04-11 14:51 ` Andy Smith
@ 2006-04-11 17:25   ` Laurent CARON
  2006-04-11 20:32     ` Andy Smith
  0 siblings, 1 reply; 11+ messages in thread
From: Laurent CARON @ 2006-04-11 17:25 UTC (permalink / raw)
  To: linux-raid

Andy Smith wrote:
> On Tue, Apr 11, 2006 at 04:41:30PM +0200, Shai wrote:
>> I have two SCSI disks on raid1.
>> Since I have lots of reads from that raid, I want to add two more
>> disks to this raid so that read will be faster.
>>
>> How should I add the new disks?
> 
> Is this possible with md currently:
> 
> Create a RAID-10 on the two new disks specifying one disk missing
> from each mirror.
> 
> Then copy data over and add the two existing disks letting it
> resync?

Why not growing the array with 2 more disks?

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

* Re: mdadm + raid1 of 2 disks and now need to add more
  2006-04-11 17:25   ` Laurent CARON
@ 2006-04-11 20:32     ` Andy Smith
  2006-04-11 22:13       ` Ming Zhang
  0 siblings, 1 reply; 11+ messages in thread
From: Andy Smith @ 2006-04-11 20:32 UTC (permalink / raw)
  To: linux-raid

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

On Tue, Apr 11, 2006 at 07:25:58PM +0200, Laurent CARON wrote:
> Andy Smith wrote:
> >On Tue, Apr 11, 2006 at 04:41:30PM +0200, Shai wrote:
> >>I have two SCSI disks on raid1.
> >>Since I have lots of reads from that raid, I want to add two more
> >>disks to this raid so that read will be faster.
> >>
> >>How should I add the new disks?
> >
> >Is this possible with md currently:
> >
> >Create a RAID-10 on the two new disks specifying one disk missing
> >from each mirror.
> >
> >Then copy data over and add the two existing disks letting it
> >resync?
> 
> Why not growing the array with 2 more disks?

Well I guess a RAID-1 of 4 disks would be slightly more redundant
than a 4 disk RAID-10, but it would have half the capacity, and the
read performance would be very similar, no?


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: mdadm + raid1 of 2 disks and now need to add more
  2006-04-11 20:32     ` Andy Smith
@ 2006-04-11 22:13       ` Ming Zhang
  2006-04-12  2:07         ` Guy
  0 siblings, 1 reply; 11+ messages in thread
From: Ming Zhang @ 2006-04-11 22:13 UTC (permalink / raw)
  To: Andy Smith; +Cc: linux-raid

On Tue, 2006-04-11 at 20:32 +0000, Andy Smith wrote:
> On Tue, Apr 11, 2006 at 07:25:58PM +0200, Laurent CARON wrote:
> > Andy Smith wrote:
> > >On Tue, Apr 11, 2006 at 04:41:30PM +0200, Shai wrote:
> > >>I have two SCSI disks on raid1.
> > >>Since I have lots of reads from that raid, I want to add two more
> > >>disks to this raid so that read will be faster.
> > >>
> > >>How should I add the new disks?
> > >
> > >Is this possible with md currently:
> > >
> > >Create a RAID-10 on the two new disks specifying one disk missing
> > >from each mirror.
> > >
> > >Then copy data over and add the two existing disks letting it
> > >resync?
> > 
> > Why not growing the array with 2 more disks?
> 
> Well I guess a RAID-1 of 4 disks would be slightly more redundant
> than a 4 disk RAID-10, but it would have half the capacity, and the
> read performance would be very similar, no?

raid1 of 4 will give u read performance like 1 disk;
raid10 of 4 can give u read performance like aggregated 2 disks.


> 


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

* RE: mdadm + raid1 of 2 disks and now need to add more
  2006-04-11 22:13       ` Ming Zhang
@ 2006-04-12  2:07         ` Guy
  2006-04-12 13:22           ` Ming Zhang
  0 siblings, 1 reply; 11+ messages in thread
From: Guy @ 2006-04-12  2:07 UTC (permalink / raw)
  To: mingz, 'Andy Smith'; +Cc: linux-raid



} -----Original Message-----
} From: linux-raid-owner@vger.kernel.org [mailto:linux-raid-
} owner@vger.kernel.org] On Behalf Of Ming Zhang
} Sent: Tuesday, April 11, 2006 6:13 PM
} To: Andy Smith
} Cc: linux-raid@vger.kernel.org
} Subject: Re: mdadm + raid1 of 2 disks and now need to add more
} 
} On Tue, 2006-04-11 at 20:32 +0000, Andy Smith wrote:
} > On Tue, Apr 11, 2006 at 07:25:58PM +0200, Laurent CARON wrote:
} > > Andy Smith wrote:
} > > >On Tue, Apr 11, 2006 at 04:41:30PM +0200, Shai wrote:
} > > >>I have two SCSI disks on raid1.
} > > >>Since I have lots of reads from that raid, I want to add two more
} > > >>disks to this raid so that read will be faster.
} > > >>
} > > >>How should I add the new disks?
} > > >
} > > >Is this possible with md currently:
} > > >
} > > >Create a RAID-10 on the two new disks specifying one disk missing
} > > >from each mirror.
} > > >
} > > >Then copy data over and add the two existing disks letting it
} > > >resync?
} > >
} > > Why not growing the array with 2 more disks?
} >
} > Well I guess a RAID-1 of 4 disks would be slightly more redundant
} > than a 4 disk RAID-10, but it would have half the capacity, and the
} > read performance would be very similar, no?
} 
} raid1 of 4 will give u read performance like 1 disk;
} raid10 of 4 can give u read performance like aggregated 2 disks.

I know RAID1 of 4 disks will give you read performance like 4 disks.
Unless your test or application is single threaded!  Not likely I hope!
At least with the 2.4.31 kernel.

A RAID1 of 4 disks will still function with any 3 failed disks.
Real good idea for remote systems.

Also I think raid10 of 4 can give u read performance like 2 to 4 disks.
This depends more on the application.  IMO.
You would have twice the space, but maybe not needed.


} 
} 
} >
} 
} -
} 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] 11+ messages in thread

* Re: mdadm + raid1 of 2 disks and now need to add more
  2006-04-11 14:41 mdadm + raid1 of 2 disks and now need to add more Shai
  2006-04-11 14:51 ` Andy Smith
@ 2006-04-12  7:18 ` Shai
  2006-04-12  8:16   ` Neil Brown
  1 sibling, 1 reply; 11+ messages in thread
From: Shai @ 2006-04-12  7:18 UTC (permalink / raw)
  To: linux-raid

I now have the md0 raid1 with 2 disks and 1 spare:
       0      22       65        0      active sync   /dev/hdd1
       1      22       66        1      active sync   /dev/hdd2

       2      22       67        2      spare   /dev/hdd3

# /usr/local/sbin/mdadm -G -n 3 /dev/md0
mdadm: Cannot set raid-devices for /dev/md0: File exists

i'm using kernel 2.4.26

# /usr/local/sbin/mdadm -V
mdadm - v2.4.1 -  4 April 2006

On 4/11/06, Shai <shaibn@gmail.com> wrote:
> Hi,
>
> I have two SCSI disks on raid1.
> Since I have lots of reads from that raid, I want to add two more
> disks to this raid so that read will be faster.
>
> How should I add the new disks?

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

* Re: mdadm + raid1 of 2 disks and now need to add more
  2006-04-12  7:18 ` Shai
@ 2006-04-12  8:16   ` Neil Brown
  2006-04-12  9:10     ` Shai
  0 siblings, 1 reply; 11+ messages in thread
From: Neil Brown @ 2006-04-12  8:16 UTC (permalink / raw)
  To: Shai; +Cc: linux-raid

On Wednesday April 12, shaibn@gmail.com wrote:
> I now have the md0 raid1 with 2 disks and 1 spare:
>        0      22       65        0      active sync   /dev/hdd1
>        1      22       66        1      active sync   /dev/hdd2
> 
>        2      22       67        2      spare   /dev/hdd3
> 
> # /usr/local/sbin/mdadm -G -n 3 /dev/md0
> mdadm: Cannot set raid-devices for /dev/md0: File exists
> 
> i'm using kernel 2.4.26

You'll need a 2.6 kernel for that, I don't remember which one is the
minimum.

If you are stuck with 2.4, you need to recreate the array:
 mdadm -S /dev/md0
 mdadm -C /dev/md0 -l1 -n3 --assume-clean /dev/hdd1 /dev/hdd2 missing
 mdadm /dev/md0 -a /dev/hdd3

(is that really 3 partitions on the one device?  Just for testing,
right?

NeilBrown

> 
> # /usr/local/sbin/mdadm -V
> mdadm - v2.4.1 -  4 April 2006
> 
> On 4/11/06, Shai <shaibn@gmail.com> wrote:
> > Hi,
> >
> > I have two SCSI disks on raid1.
> > Since I have lots of reads from that raid, I want to add two more
> > disks to this raid so that read will be faster.
> >
> > How should I add the new disks?
> -
> 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] 11+ messages in thread

* Re: mdadm + raid1 of 2 disks and now need to add more
  2006-04-12  8:16   ` Neil Brown
@ 2006-04-12  9:10     ` Shai
  2006-04-16 23:36       ` Neil Brown
  0 siblings, 1 reply; 11+ messages in thread
From: Shai @ 2006-04-12  9:10 UTC (permalink / raw)
  To: linux-raid; +Cc: Neil Brown

yea! it is a testing server I use that is the same kernel as our main
server... just for tests like these so we don't screw up .... I never
run the real thing before I'm sure I know I've got it working on our
test server.

Well... what I did was:
--------------------------------

# cat do_changes.sh
#!/bin/bash -x

umount /mnt/md0
read
mdadm --stop /dev/md0
read
mdadm --zero-super /dev/ide/host0/bus1/target1/lun0/part1
read
mdadm -C -n 4 -l 1 /dev/md0 /dev/ide/host0/bus1/target1/lun0/part1
missing missing missing
read
### end of script ###

What do you think?

Shai

On 4/12/06, Neil Brown <neilb@suse.de> wrote:
> On Wednesday April 12, shaibn@gmail.com wrote:
> > I now have the md0 raid1 with 2 disks and 1 spare:
> >        0      22       65        0      active sync   /dev/hdd1
> >        1      22       66        1      active sync   /dev/hdd2
> >
> >        2      22       67        2      spare   /dev/hdd3
> >
> > # /usr/local/sbin/mdadm -G -n 3 /dev/md0
> > mdadm: Cannot set raid-devices for /dev/md0: File exists
> >
> > i'm using kernel 2.4.26
>
> You'll need a 2.6 kernel for that, I don't remember which one is the
> minimum.
>
> If you are stuck with 2.4, you need to recreate the array:
>  mdadm -S /dev/md0
>  mdadm -C /dev/md0 -l1 -n3 --assume-clean /dev/hdd1 /dev/hdd2 missing
>  mdadm /dev/md0 -a /dev/hdd3
>
> (is that really 3 partitions on the one device?  Just for testing,
> right?
>
> NeilBrown
>
> >
> > # /usr/local/sbin/mdadm -V
> > mdadm - v2.4.1 -  4 April 2006
> >
> > On 4/11/06, Shai <shaibn@gmail.com> wrote:
> > > Hi,
> > >
> > > I have two SCSI disks on raid1.
> > > Since I have lots of reads from that raid, I want to add two more
> > > disks to this raid so that read will be faster.
> > >
> > > How should I add the new disks?
> > -
> > 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] 11+ messages in thread

* RE: mdadm + raid1 of 2 disks and now need to add more
  2006-04-12  2:07         ` Guy
@ 2006-04-12 13:22           ` Ming Zhang
  0 siblings, 0 replies; 11+ messages in thread
From: Ming Zhang @ 2006-04-12 13:22 UTC (permalink / raw)
  To: Guy; +Cc: 'Andy Smith', linux-raid

On Tue, 2006-04-11 at 22:07 -0400, Guy wrote:
> 
> } -----Original Message-----
> } From: linux-raid-owner@vger.kernel.org [mailto:linux-raid-
> } owner@vger.kernel.org] On Behalf Of Ming Zhang
> } Sent: Tuesday, April 11, 2006 6:13 PM
> } To: Andy Smith
> } Cc: linux-raid@vger.kernel.org
> } Subject: Re: mdadm + raid1 of 2 disks and now need to add more
> } 
> } On Tue, 2006-04-11 at 20:32 +0000, Andy Smith wrote:
> } > On Tue, Apr 11, 2006 at 07:25:58PM +0200, Laurent CARON wrote:
> } > > Andy Smith wrote:
> } > > >On Tue, Apr 11, 2006 at 04:41:30PM +0200, Shai wrote:
> } > > >>I have two SCSI disks on raid1.
> } > > >>Since I have lots of reads from that raid, I want to add two more
> } > > >>disks to this raid so that read will be faster.
> } > > >>
> } > > >>How should I add the new disks?
> } > > >
> } > > >Is this possible with md currently:
> } > > >
> } > > >Create a RAID-10 on the two new disks specifying one disk missing
> } > > >from each mirror.
> } > > >
> } > > >Then copy data over and add the two existing disks letting it
> } > > >resync?
> } > >
> } > > Why not growing the array with 2 more disks?
> } >
> } > Well I guess a RAID-1 of 4 disks would be slightly more redundant
> } > than a 4 disk RAID-10, but it would have half the capacity, and the
> } > read performance would be very similar, no?
> } 
> } raid1 of 4 will give u read performance like 1 disk;
> } raid10 of 4 can give u read performance like aggregated 2 disks.
> 
> I know RAID1 of 4 disks will give you read performance like 4 disks.
> Unless your test or application is single threaded!  Not likely I hope!
> At least with the 2.4.31 kernel.

for random read, u can make use of 4 disk in parallel. but for
sequential workload, it has not much gain.

> 
> A RAID1 of 4 disks will still function with any 3 failed disks.
> Real good idea for remote systems.

unless u data is that critical, u only get 25% disk utilization here.

> 
> Also I think raid10 of 4 can give u read performance like 2 to 4 disks.
> This depends more on the application.  IMO.
> You would have twice the space, but maybe not needed.


> 
> 
> } 
> } 
> } >
> } 
> } -
> } 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] 11+ messages in thread

* Re: mdadm + raid1 of 2 disks and now need to add more
  2006-04-12  9:10     ` Shai
@ 2006-04-16 23:36       ` Neil Brown
  0 siblings, 0 replies; 11+ messages in thread
From: Neil Brown @ 2006-04-16 23:36 UTC (permalink / raw)
  To: Shai; +Cc: linux-raid

On Wednesday April 12, shaibn@gmail.com wrote:
> yea! it is a testing server I use that is the same kernel as our main
> server... just for tests like these so we don't screw up .... I never
> run the real thing before I'm sure I know I've got it working on our
> test server.
> 
> Well... what I did was:
> --------------------------------
> 
> # cat do_changes.sh
> #!/bin/bash -x
> 
> umount /mnt/md0
> read
> mdadm --stop /dev/md0
> read
> mdadm --zero-super /dev/ide/host0/bus1/target1/lun0/part1
> read
> mdadm -C -n 4 -l 1 /dev/md0 /dev/ide/host0/bus1/target1/lun0/part1
> missing missing missing
> read
> ### end of script ###
> 
> What do you think?

Yes, that looks fine.

NeilBrown


> 
> Shai
> 
> On 4/12/06, Neil Brown <neilb@suse.de> wrote:
> > On Wednesday April 12, shaibn@gmail.com wrote:
> > > I now have the md0 raid1 with 2 disks and 1 spare:
> > >        0      22       65        0      active sync   /dev/hdd1
> > >        1      22       66        1      active sync   /dev/hdd2
> > >
> > >        2      22       67        2      spare   /dev/hdd3
> > >
> > > # /usr/local/sbin/mdadm -G -n 3 /dev/md0
> > > mdadm: Cannot set raid-devices for /dev/md0: File exists
> > >
> > > i'm using kernel 2.4.26
> >
> > You'll need a 2.6 kernel for that, I don't remember which one is the
> > minimum.
> >
> > If you are stuck with 2.4, you need to recreate the array:
> >  mdadm -S /dev/md0
> >  mdadm -C /dev/md0 -l1 -n3 --assume-clean /dev/hdd1 /dev/hdd2 missing
> >  mdadm /dev/md0 -a /dev/hdd3
> >
> > (is that really 3 partitions on the one device?  Just for testing,
> > right?
> >
> > NeilBrown
> >
> > >
> > > # /usr/local/sbin/mdadm -V
> > > mdadm - v2.4.1 -  4 April 2006
> > >
> > > On 4/11/06, Shai <shaibn@gmail.com> wrote:
> > > > Hi,
> > > >
> > > > I have two SCSI disks on raid1.
> > > > Since I have lots of reads from that raid, I want to add two more
> > > > disks to this raid so that read will be faster.
> > > >
> > > > How should I add the new disks?
> > > -
> > > 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] 11+ messages in thread

end of thread, other threads:[~2006-04-16 23:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-11 14:41 mdadm + raid1 of 2 disks and now need to add more Shai
2006-04-11 14:51 ` Andy Smith
2006-04-11 17:25   ` Laurent CARON
2006-04-11 20:32     ` Andy Smith
2006-04-11 22:13       ` Ming Zhang
2006-04-12  2:07         ` Guy
2006-04-12 13:22           ` Ming Zhang
2006-04-12  7:18 ` Shai
2006-04-12  8:16   ` Neil Brown
2006-04-12  9:10     ` Shai
2006-04-16 23:36       ` Neil Brown

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).