linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RAID0 to RAID5 upgrade
@ 2007-03-01 23:12 Bill Davidsen
  2007-03-01 23:39 ` Peter Rabbitson
  0 siblings, 1 reply; 3+ messages in thread
From: Bill Davidsen @ 2007-03-01 23:12 UTC (permalink / raw)
  To: Linux RAID

I have three drives, with some various partitions, currently set up like 
this.

  drive0    drive1    drive2

   hdb1      hdi1      hdk1
   \_________RAID1________/

   hdb2      hdi2      hdk2
  unused     \___RAID0____/
   200GB       100GB x 2

             hdi3      hdk3
             \___unused___/
                100GB x 2

What I want to have is 3 x 200 = 400GB RAID5.

I would like to avoid copying 200GB of data to another machine and back 
if I can do the conversion. Since mdadm does handle --level= with grow, 
I assume I have to create another RAID0 from hd[ik]3, copy the data 
there, delete the array using hd[ik]2, create a new RAID5 to use 
hd[bik]2, copy the data from the temporary array to the new RAID5 array, 
delete the hd[ik]3 partitions, grow the hd[bik]2 partitions, grow the 
array, and if I didn't miss a step be done :-(

Is there a better way? Copy over a network or restore are going to be 
very slow.

-- 
bill davidsen <davidsen@tmr.com>
  CTO TMR Associates, Inc
  Doing interesting things with small computers since 1979


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

* Re: RAID0 to RAID5 upgrade
  2007-03-01 23:12 RAID0 to RAID5 upgrade Bill Davidsen
@ 2007-03-01 23:39 ` Peter Rabbitson
  2007-03-02 20:31   ` Bill Davidsen
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Rabbitson @ 2007-03-01 23:39 UTC (permalink / raw)
  To: linux-raid

On Thu, Mar 01, 2007 at 06:12:32PM -0500, Bill Davidsen wrote:
> I have three drives, with some various partitions, currently set up like 
> this.
> 
>  drive0    drive1    drive2
> 
>   hdb1      hdi1      hdk1
>   \_________RAID1________/
> 
>   hdb2      hdi2      hdk2
>  unused     \___RAID0____/
>   200GB       100GB x 2
> 
>             hdi3      hdk3
>             \___unused___/
>                100GB x 2
> 
> What I want to have is 3 x 200 = 400GB RAID5.
> 
> I would like to avoid copying 200GB of data to another machine and back 

Can't you do the following:

* copy the data from raid0 to hdb2 ( raid0 <= hdb2 you can even do a dd)
* degrade raid1 to only contain drive0
* since you have all your data on drive0, wipe drive1 and drive2 clean, 
create a degraded raid5
* copy stuff from drive0 to the new array (enw fs as well I presume)
* resync the raid5 with drive0



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

* Re: RAID0 to RAID5 upgrade
  2007-03-01 23:39 ` Peter Rabbitson
@ 2007-03-02 20:31   ` Bill Davidsen
  0 siblings, 0 replies; 3+ messages in thread
From: Bill Davidsen @ 2007-03-02 20:31 UTC (permalink / raw)
  To: Peter Rabbitson; +Cc: linux-raid

Peter Rabbitson wrote:
> On Thu, Mar 01, 2007 at 06:12:32PM -0500, Bill Davidsen wrote:
>   
>> I have three drives, with some various partitions, currently set up like 
>> this.
>>
>>  drive0    drive1    drive2
>>
>>   hdb1      hdi1      hdk1
>>   \_________RAID1________/
>>
>>   hdb2      hdi2      hdk2
>>  unused     \___RAID0____/
>>   200GB       100GB x 2
>>
>>             hdi3      hdk3
>>             \___unused___/
>>                100GB x 2
>>
>> What I want to have is 3 x 200 = 400GB RAID5.
>>
>> I would like to avoid copying 200GB of data to another machine and back 
>>     
>
> Can't you do the following:
>
> * copy the data from raid0 to hdb2 ( raid0 <= hdb2 you can even do a dd)
> * degrade raid1 to only contain drive0
> * since you have all your data on drive0, wipe drive1 and drive2 clean, 
> create a degraded raid5
> * copy stuff from drive0 to the new array (enw fs as well I presume)
> * resync the raid5 with drive0

The RAID1 is "most critical" data, and would never voluntarily be 
degraded. And since I only want to combine hd[ij][23] I would have no 
reason to do that. Other than that, it seems possible, assuming that 
mdadm will actually create the degraded RAID5 array with enough room for 
the data.

I'm testing that now.

-- 
bill davidsen <davidsen@tmr.com>
  CTO TMR Associates, Inc
  Doing interesting things with small computers since 1979


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

end of thread, other threads:[~2007-03-02 20:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-01 23:12 RAID0 to RAID5 upgrade Bill Davidsen
2007-03-01 23:39 ` Peter Rabbitson
2007-03-02 20:31   ` 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).