[WBEL-users] Adding to RAID 1, only sees new partition as spare...

Kirby C. Bohling kbohling at birddog.com
Tue May 17 17:44:55 CDT 2005



On Tue, May 17, 2005 at 03:15:57PM -0700, Scott Silva wrote:
> Benjamin Smith wrote:
> > I have a server that does backups, and I want to replace an existing 160 GB 
> > drive, with a RAID 1 300 GB array. 
> > 
> > I don't have enough IDE slots to mount all at the same time. So, I installed a 
> > single 300 GB HDD, configured it as /dev/md0 RAID 1, made a filesystem, 
> > mounted, and copied all the data over. It's seen and mounts fine with all 
> > data present. 
> > 
> > Now, I've removed the original 160 GB HDD, and put the other new 300 GB in 
> > it's place. 
> > 
> > I've tried and tried, and I can't get the 2nd 300 GB drive to sync up to the 
> > first 300 GB drive. It keeps seeing it as a spare... 
> > 
> > What am I missing? 
> > 
> > 1st 300 GB partn in array (with data on it) /dev/hdh1 
> > 2nd 300 GB partn in array (seen as spare) /dev/hde1 
> 
> 
> Did you properly partition the new drive as type fd (linux raid)?
> 
> Maybe you should use mdadm. I have had better luck with it over raidtools.
> you would use ;
> 
> sfdisk -d /dev/hdh |sfdisk /dev/hde
> 
> to clone the partition data, then
> 
> mdadm -a /dev/md0 /dev/hde1

For whatever it's worth, I've had lots of problems doing just that.
I've attempted at various points to add a third mirror to a two disk
set.  I'll explain with a scenerio:

I have drives /dev/sd{a,b,c}.  /dev/sda and /dev/sdb are in md0.
/dev/sdb failes.  I add sdc to md0.  I get a replacement in for sdb.
What I want to do is add sdb back to md0 let it re-sync, and then
remove sdc.  I've never been able to do that.  Instead, I have to
remove sdc (leaving only sda in the array), and then add sdb.

I believe the problem is that the array configuration says, there is
one drive on the RAID metadata.  I have yet to find a tool that will
allow you to change that.  Any additional drives that get added,
must be spares.  I'm curious what it would take to edit the metadata
on the RAID array to convince it that you have two drives in the
array instead of one.

You are probably stuck.  Maybe using mdadm you can create a new
array.  If you know which disk is going to get used as the source of
the mirror (I've never known that, so I'm afraid to try it).

Possibly this has something that can modify the on disk metadata:
http://unthought.net/raidreconf/

I've never played with that, but it's supposed to be really nifty,
if not production quality.

    Thanks,
        Kirby
> 
> 
> 
> -- 
>    ,---.____________      _        ============   .
>  /'                  \   |  \       I_  O  _I_,==.:
> | A beer doesn't get  >--|===`-----'I `---' I |  |:
> | upset if you come  /  _ \         I       I |  |:'
> | home with another /  (   `-,----============:__;:
> | beer!            /  (_    O   __)       \_      :
> | ,,---.__________/     (______)          (_)
> :/
> 
> _______________________________________________
> Whitebox-users mailing list
> Whitebox-users at beau.org
> http://beau.org/mailman/listinfo/whitebox-users
> 


More information about the Whitebox-users mailing list