[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Migrating raid5 to raid 1



On Mon, Oct 15, 2007 at 01:43:42PM +1000, Alex Samad wrote:
> 
> I have a system with 3 x 200G setup as a raid 5 config, I have just purchased 
> to 750g drives with the thought of using raid1.
  ^^ do you mean two?
> 
> I could remove one of the 200G drive - run the raid5 in degraded mode and 
> create a raid1 in degraded mode.
> 
> I also use lvm2, so moving most of it should be easy ?
> 
> I don't have any media to do a backup and restore to (although I do have an 
> external usb HD case ?)
> 
> Are there any other options ?

I don't understand the problem.  Are you saying that your box will only
take 4 drives?  I'll assume that this is the case and if its not, let us
know and we'll go on a new assumption.

So, I would put one of the new 750 GB drives in the external USB HD
case.  Attach it to the box and ensure that udev assigns it a sd*
device.  Add the second 750 GB drive into the box itself.  You should
now have 5 sd* drives.  

At every step, you'll need to verify with all the LVM and raid tools
that everything is valid and synced.  

Now, set up the two 750 GB drives as your raid1 array.  Assuming that
you only have one volume group in your LVM.  

You should now have md0 (your raid5 array) and md1 (your raid1 array).  

Now add md1 to your volume group.  Check the vgdisplay, lvdisplay, etc
to ensure all is well.  

Now pvremove the md0 array from the volume group and wait while LVM
migrates things over to the new drives.

Once you ensure that md0 is no longer being used in the LVM, you can
tear down md0.

Now physically remove on of those 200 GB drives and move the 750 GB
drive from the external USB box to the internal box.

On boot up, you should be running with everything on your raid1.

Doug.



Reply to: