LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 04-04-2004, 05:20 PM   #1
thadco
LQ Newbie
 
Registered: Jul 2003
Posts: 12

Rep: Reputation: 0
Rebuild Software RAID 1


Performed an acid test of my software RAID level 1 and can't for the life of me figure out how to re-sync/rebuild the array. At least I know GRUB works nicely from either drive.

Currently running in degraded mode. I think the following will give all the info required to help me get back on the right path.

---------------------------

[root@krell root]# lsraid -a /dev/md0 -a /dev/md1 -a /dev/md2
[dev 9, 0] /dev/md0 4B97747C.B68C533E.DC5AA065.0A4F42FD online
[dev 33, 1] /dev/hde1 4B97747C.B68C533E.DC5AA065.0A4F42FD good
[dev ?, ?] (unknown) 00000000.00000000.00000000.00000000 missing

[dev 9, 1] /dev/md1 F200A9DD.FC2736B1.25E93D02.6A031A26 online
[dev 33, 3] /dev/hde3 F200A9DD.FC2736B1.25E93D02.6A031A26 good
[dev ?, ?] (unknown) 00000000.00000000.00000000.00000000 missing

[dev 9, 2] /dev/md2 D2DECFDF.27BCC8AF.4B9A16F7.E02123FF online
[dev 33, 2] /dev/hde2 D2DECFDF.27BCC8AF.4B9A16F7.E02123FF good
[dev ?, ?] (unknown) 00000000.00000000.00000000.00000000 missing

[root@krell etc]# cat raidtab
raiddev /dev/md1
raid-level 1
nr-raid-disks 2
chunk-size 64
persistent-superblock 1
nr-spare-disks 0
device /dev/hda3
raid-disk 0
device /dev/hde3
raid-disk 1
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
chunk-size 64
persistent-superblock 1
nr-spare-disks 0
device /dev/hda1
raid-disk 0
device /dev/hde1
raid-disk 1
raiddev /dev/md2
raid-level 1
nr-raid-disks 2
chunk-size 64
persistent-superblock 1
nr-spare-disks 0
device /dev/hda2
raid-disk 0
device /dev/hde2
raid-disk 1

[root@krell root]# sfdisk -l

Disk /dev/hde: 14593 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/hde1 * 0+ 12 13- 104391 fd Linux raid autodetect
/dev/hde2 13 142 130 1044225 fd Linux raid autodetect
/dev/hde3 143 14592 14450 116069625 fd Linux raid autodetect
/dev/hde4 0 - 0 0 0 Empty

Disk /dev/hda: 14593 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/hda1 * 0+ 12 13- 104391 fd Linux raid autodetect
/dev/hda2 13 142 130 1044225 fd Linux raid autodetect
/dev/hda3 143 14592 14450 116069625 fd Linux raid autodetect
/dev/hda4 0 - 0 0 0 Empty

---------------------------

As you can see, my testing disconnected all the hda devices from the array. I've been searching around, but just can't seem to figure out the magic required to get the hda drives back into the array and re-synched. I tried:

mdadm --create /dev/md0 --level=raid1 --raid-devices=2 /dev/hde1 /dev/hda1

but got:

SET_ARRAY_INFO failed for /dev/md0: File exists

So now I'm stuck. And let me pre-apologize if this answer has been obviously provided elsewhere and somehow I'm too thick to get it. I really have been searching for hours and am truly stumped.

While I'm at it, can someone tell me how to proceed when I get a power outage problem and upon reboot GRUB will get stuck at Stage 2 due to the file system corruption? That's my next test and I'd rather not get stuck again.
 
Old 06-03-2004, 05:06 AM   #2
kenji1903
Member
 
Registered: Apr 2004
Location: M'sia, Aus, Chn
Distribution: Redhat Linux 8 & 9, Fedora Core 2, XP
Posts: 301

Rep: Reputation: 30
have you tried:
/sbin/raidhotadd /dev/mdX /dev/hdXX?

I'm having RAID problems myself... i got everything re-mirrored but I can't boot into Linux...
I think my problem lies in hda... my hdc can boot normally without hda initially...

Here is what I did to the hda that I took out:
* reformatted in XP
* hook it up again
* sfdisk-ed it
* remirror-ed everything
then boom:
Error loading operating system
When I rebooted the PC...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I mount this md0 raid? (mdadm and software raid) cruiserparts Linux - Software 35 01-05-2013 04:35 PM
How to rebuild a damaged raid 1 array? mrpc_cambodia Linux - General 1 04-12-2005 09:22 AM
Can fake raid be converted to linux software raid? jmacdonald801 Linux - General 3 01-30-2005 01:33 PM
rebuild kernel 2.6 boot fail on soft RAID fs Ducko Fedora 4 10-05-2004 09:40 PM
moving system from ide software raid to new box with scsi raid ftumsh Linux - General 0 10-28-2003 10:34 AM


All times are GMT -5. The time now is 03:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration