LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-10-2009, 09:39 AM   #1
jessemirza
LQ Newbie
 
Registered: Dec 2007
Location: The Netherlands, Amsterdam
Distribution: Redhat, Debian & Gentoo
Posts: 13

Rep: Reputation: 0
Unhappy Software Raid1 on Redhat 5


Hi All,

I have a REHL 5 installed with these partitions

Disk1
Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 1069 8385930 82 Linux swap / Solaris
/dev/sda3 1070 91201 723985290 83 Linux

and i just put in a extra disk and am trying to create a Raid1 configuration.

What i did is i copied the partition table with

#sfdisk -d /dev/sda | sfdisk /dev/sdb

Then i changed the disk setting of sdb like this

Disk2
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 25 200781 fd Linux raid autodetect
/dev/sdb2 26 1069 8385930 fd Linux raid autodetect
/dev/sdb3 1070 91201 723985290 fd Linux raid autodetect

Then i did this

mdadm --create /dev/md0 --level=1 --raid-disks=2 missing /dev/sdb1
mdadm --create /dev/md1 --level=1 --raid-disks=2 missing /dev/sdb2
mdadm --create /dev/md2 --level=1 --raid-disks=2 missing /dev/sdb3

cat /proc/mdstat give me this outpout

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid1 sdb3[1]
723985216 blocks [2/1] [_U]

md1 : active raid1 sdb2[1]
8385856 blocks [2/1] [_U]

md0 : active raid1 sdb1[1]
200704 blocks [2/1] [_U]

unused devices: <none>

Here is where i get lost and don't know where to go from here

Can some one give me a word of advise ?

Best regards

Jesse
 
Old 02-10-2009, 06:45 PM   #2
FragInHell
Member
 
Registered: Sep 2003
Location: Sydney Australia
Distribution: Redhat, Centos, Solaris, Ubuntu, SUSE
Posts: 282

Rep: Reputation: 45
Ok so my guess here is your trying to mirror your root disk (disk1) to disk2?
I've never tried this but here's what I would try.
Create your logical volumes etc on disk 2 in your raid devices /dev/md? etc. Then copy (dd) in single user mode all the data from disk 1 to disk 2.
Now the hard part, reboot the system to disk 2.
Make sure the system starts comes up ok, then do re-create the partitions/raid sets on disk1, this should automatically mirror the data back.
Reboot and test.

This is just and Idea, as I say I've never tried it. Make sure you have a good backup before you start, try some thing like Clonezilla.
 
Old 02-11-2009, 04:25 AM   #3
jessemirza
LQ Newbie
 
Registered: Dec 2007
Location: The Netherlands, Amsterdam
Distribution: Redhat, Debian & Gentoo
Posts: 13

Original Poster
Rep: Reputation: 0
Hi FragInHell,

Thanx four your advise i will give it a tray but just one thing ! on Disk1 i don't have a LVM running!

Does that matter ?

Cheers

Jesse
 
Old 02-11-2009, 03:37 PM   #4
FragInHell
Member
 
Registered: Sep 2003
Location: Sydney Australia
Distribution: Redhat, Centos, Solaris, Ubuntu, SUSE
Posts: 282

Rep: Reputation: 45
I Just made the assumption as most installation normally default to Logical Volumes. In that case its makes it alot easier.
Boot from a Rescue CD, and copy all the data from disk1 to disk2, reboot onto disk two re-create the partitions on disk1 to match disk2 and add then add disk1 into the raid sat this will start the sync process.
 
  


Reply



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 SBN Linux - General 1 01-21-2009 08:47 AM
Software raid1 shadowers Linux - Hardware 2 10-24-2008 04:08 PM
Have software raid1, but like to change to raid1+0 or 0+1, how? spaceuser Debian 8 03-17-2008 02:07 PM
Software RAID1 problems robbow52 Debian 7 11-15-2004 10:52 AM
Software Raid1 has failed in Redhat 7.2 nabil Linux - Software 1 06-23-2002 10:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:16 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
Open Source Consulting | Domain Registration