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

Kirby C. Bohling kbohling at birddog.com
Sat Jun 18 17:29:56 CDT 2005


On Wed, May 18, 2005 at 03:21:07PM -0500, Kirby C. Bohling wrote:
> On Wed, May 18, 2005 at 01:06:25PM -0700, Scott Silva wrote:
> > Benjamin Smith wrote:
> > 
> > >It appears that it's simply not possible to "add" drives to a RAID 1 array. 
> > >raidreconf does not support RAID 1. 
> > >
> > >I had to start from scratch, reinitialize the array with both drives, run 
> > >mke2fs, and recopy the data back over from the original drive. It took 
> > >another 17 hours to copy everything, (ugh) but it's all up and working fine 
> > >now. 
> > >
> > >Thanks! 
> > >
> > >-Ben 
> > >
> > >On Tuesday 17 May 2005 15:15, 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
> > >>
> > >>
> > >>    
> > >>
> > I know you can create a raid1 array with only one drive and add the
> > other drive later, because I have done it.
> > 
> 
> That's really nice, show me a command that changes the number of
> devices in a RAID device.  That is the crux of your problem.

Okay, I'm completely wrong... For the sake of completness, I'm
replying back to this thread in case anyone every finds it.

According to "man mdadm" --grow is the option that will let you add
or subtract from the number of devices in an md device.  The problem
is that you need to have kernel support to do it.  Unfortantly the
man page isn't terribly specific about what versions allow you to do
it.  I would bet you can do it on a RHEL/WBEL3 kernel, but I don't
know for sure if that is true.  The man page references doing it
with a 2.6, but I'll bet RH backported it to their 2.4 Enterprise
kernel.

I found this while reading the mdadm man page for a different
problem.  For future reference, if you ever have a disk drive fail
when you read a particular section, "ddrescue" is a very handy tool
to recover all the non-broken portions of the disk.  We are going to
end up recoverying a lot of stuff off of a RAID5 that lost two disks
with it.

    Thanks,
        Kirby


More information about the Whitebox-users mailing list