LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 01-19-2008, 05:01 PM   #1
proNick
Member
 
Registered: Apr 2005
Posts: 104

Rep: Reputation: 15
raid1 - recovery after crash


hi all!

please if you can help me how to recovery raid on linux centos system, after crash...

i have raid1.

now i can not boot linux, to fix it using sfdisk of mdadm...


can you give me some advice how to fix it? thank you in advance!
 
Old 01-19-2008, 05:41 PM   #2
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
Being a raid 1 this means the drives are mirrored. So data is written to both drives identically. So if software issue both have the same issue unless one drive fails but the data is still written to the other and keeps going.

Now what might help is explain in detail the issue you are having and when it happens during the boot process.

Brian
 
Old 01-19-2008, 05:42 PM   #3
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
Do you have true hardware RAID (through a raid card), or was this just 2 drives plugged into a motherboard, which is software RAID?

The simple solution would be to stick a live CD/DVD in (knoppix for example), and see if all of your data is still on the mirrored disk. If it is, install grub to the mirror, bring it up, then rebuild mdadm with a replacement disk for the one that failed. If it is hardware RAID, then all you have to do is reboot with a replacement drive, and the controller will take care of everything.

Peace,
JimBass
 
Old 01-20-2008, 03:31 AM   #4
proNick
Member
 
Registered: Apr 2005
Posts: 104

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by JimBass View Post
Do you have true hardware RAID (through a raid card), or was this just 2 drives plugged into a motherboard, which is software RAID?

The simple solution would be to stick a live CD/DVD in (knoppix for example), and see if all of your data is still on the mirrored disk. If it is, install grub to the mirror, bring it up, then rebuild mdadm with a replacement disk for the one that failed. If it is hardware RAID, then all you have to do is reboot with a replacement drive, and the controller will take care of everything.

Peace,
JimBass


it's software raid.

so, all i have to do is to connect new disk instead of old one, and boot system from rescue disk? after that to install grub and to mirror disks with mdadm. and that's all?


nikola
 
Old 01-20-2008, 07:26 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970Reputation: 1970
what does raid have to do with networking? please pay attention to the forums you post in in future. moved to Linux - Newbie.
 
Old 01-20-2008, 09:28 AM   #6
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 48
No, you first have to see what (if any) data is safe. As Brian1 said, RAID1 is a mirror, so if you did something that erased things or screwed them up, it is going to be the same on both disks. If it is a "simple" failure, like the disk itself screwed up somehow, then follow the very detailed instructions on this page:

http://www.howtoforge.com/replacing_..._a_raid1_array

Peace,
JimBass
 
Old 01-20-2008, 01:33 PM   #7
proNick
Member
 
Registered: Apr 2005
Posts: 104

Original Poster
Rep: Reputation: 15
thank you for your answers. it was a great help to recover system.

now (it looks) that it works well, but...

on a fdisk -l command, i got list od 3 partitions, with following errors:

Disk /dev/md1/ doesn't contain a valid partition table
Disk /dev/md2/ doesn't contain a valid partition table
Disk /dev/md0/ doesn't contain a valid partition table

how can i fix this one?

thank you in advance!
 
Old 01-21-2008, 01:17 PM   #8
proNick
Member
 
Registered: Apr 2005
Posts: 104

Original Poster
Rep: Reputation: 15
i noticed one more problem... please if somebody can tell me something about next messages (from /var/log/messages):

.........
Jan 22 01:27:22 markerm kernel: md: md3: raid array is not clean -- starting background reconstruction
.........
Jan 22 01:27:22 markerm kernel: md: md1: raid array is not clean -- starting background reconstruction
.........
Jan 22 01:27:22 markerm kernel: md: md0: raid array is not clean -- starting background reconstruction
.........
Jan 22 01:27:22 markerm kernel: md: md4: raid array is not clean -- starting background reconstruction
.........


updated: on http://www.fedoraforum.org/forum/sho...d.php?t=101257 i found that this is "normal", that RAID1 volumes need to be synchronised across the two hard disks. it that true?

thank you in advance!

Last edited by proNick; 01-21-2008 at 01:31 PM.
 
Old 01-21-2008, 04:37 PM   #9
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
Never used Software raid so I don't know. Google for the error and see what you get might help.

Brian
 
  


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
Software RAID1 Recovery Issues (SARGE) jimbo1954 Linux - Server 2 04-24-2007 02:47 AM
Hard drive crash...data recovery? goemon Linux - Hardware 4 11-20-2005 08:30 PM
lets discus about the Linux crash and recovery razan Linux - Security 1 04-29-2005 02:18 AM
john the ripper: crash recovery file is locked (???) zarniwoop Linux - Software 1 03-31-2004 08:52 AM
Crash Recovery Questions And Issues svar Linux - General 1 07-31-2003 08:20 AM


All times are GMT -5. The time now is 05:49 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration