[WBEL-users] Adding to RAID 1, only sees new partition as spare...
{Scanned} {Scanned}
Scott Silva
ssilva at sgvwater.com
Wed May 18 18:53:58 CDT 2005
Kirby C. Bohling wrote:
> On Wed, May 18, 2005 at 02:34:57PM -0700, Scott Silva wrote:
>
>>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.
>>>
>>>I've read that you can create a RAID device, and tell it there are
>>>two devices, and make one that fails immediatly (any old block
>>>device will do the job as long as it appears to be large enough).
>>>It will write the meta-data to the first block device so it looks
>>>like it has two devices. (Essentially, you are creating a mirror
>>>with a device that fails immediatly, and then adding a new device
>>>later).
>>>
>>>I've never seen anyone actually do it.
>>>
>>> Thanks,
>>> Kirby
>>
>>mdadm --create /dev/md1 --level=raid1 --raid-devices=2 /dev/sda1 missing
>>would create a 2 drive array with only one drive present.
>>Later you could add the second drive with mdadm -a /dev/md1 /dev/hdc1 or
>>whatever drive you wanted to add.
>
>
> Good trick (I'll have to remember that one). For the original
> poster, I believe that won't help him at this point, but would have
> solved his problem if the original mirror had been setup that way.
>
> Kirby
I do believe it is in the software-raid howto. But don't hold me to it!
It has been a busy day! ;)
--
,---.____________ _ ============ .
/' \ | \ I_ O _I_,==.:
| A beer doesn't get >--|===`-----'I `---' I | |:
| upset if you come / _ \ I I | |:'
| home with another / ( `-,----============:__;:
| beer! / (_ O __) \_ :
| ,,---.__________/ (______) (_)
:/
More information about the Whitebox-users
mailing list