[CentOS] Re: Rebuilding Raid 1

Tue May 2 03:48:58 UTC 2006
Mace Eliason <meliason at shaw.ca>

Almost any way.

I finally booted the drives after backing up the drive with the current 
It has booted into Centos and to my supprize it is using the drive with 
the most recent info.

But it is not using raid as far as I can tell.  If I load logical volume 
management it shows

Uninitialized Entities
   partition 1
   partition 2
   partition 3

  partition 1
  partition 2
  partition 3

I tried mounting sda3 and check and found it is the older info the 
(drive to be replaced)

So from what you stated below I would run:

sfdisk -d /dev/sdb | sfdisk /dev/sda

Is this correct because sdb has the most current info and sda is the old 

Then I would run mdadm


Scott Silva wrote:
> Hi
> Thanks for your help, I am sure your busy doing other things as well.
> As I stated in previous postings I have changed the scsi ids and now
> with the two drives attached it will boot from the old drive (I am
> assuming it is the old drive because the other drive would'nt boot on
> its own.
> If I do boot to centos now will it rebuild the mirror from the booting
> drive to the other drive?
> I am worried about haveing the current info over written by the old info.
> At this point I will settle for just getting the one drive that has
> the current info booting and working.
> Thanks for any help

If the system is running, and you know which drive is which, you can
repair very easily now.
If everything is running from /dev/sda and the bad drive is /dev/sdb you
can do the following
(make sure which drive is which before continuing);

sfdisk -d /dev/sda | sfdisk /dev/sdb  >-- make sure on the drives ..
good drive first, bad drive second.
Then you can add the partitions back to their arrys with mdadm.