LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-12-2009, 11:07 PM   #1
narender1762
LQ Newbie
 
Registered: Jul 2009
Posts: 3

Rep: Reputation: 0
to configure RAID 1 on Red hat Enterprise Linux after installation of operating syste


Hi

How to configure RAID 1 (hardware RAID 1 or Software RAID1 ) after installation of operating system : RED HAT ENTERPRISE LINUX 5.3 SERVER

regards

Naren
 
Old 07-12-2009, 11:16 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681
AFAIK, you will need to reinstall. If this is a new installation, that won't be a problem. Otherwise you could perform a full backup, re-create your partitions and restore the files.

If your system uses LVM2, you can add a hot spare. This will give you the same redundancy protection as a RAID 1 array.
 
Old 07-12-2009, 11:27 PM   #3
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by narender1762 View Post
Hi

How to configure RAID 1 (hardware RAID 1 or Software RAID1 ) after installation of operating system : RED HAT ENTERPRISE LINUX 5.3 SERVER

regards

Naren
Depends where you want the RAID1...if you want your "root: (i.e. / ) under RAID1; you are going to have to reinstall.

If you just want another mnt point to be RAID1 you can use mdadm to make a raid.

-C

Last edited by custangro; 07-12-2009 at 11:37 PM.
 
Old 07-13-2009, 12:45 AM   #4
cmdln
Member
 
Registered: Apr 2009
Location: Lawrence, KS
Distribution: Debian, Centos
Posts: 108
Blog Entries: 1

Rep: Reputation: 25
No, you do not have to reinstall. You can migrate without too much horrible pain. Really its not that bad, though I would recommend practicing on a non production system. I've successfully done it several times, I don't have any notes handy but it goes something like this.

copy your partition table from your first disk to the second (btw I am assuming you initally installed on one disk then added a second)
sfdisk -d /dev/sda | sfdisk /dev/sdb
create the raid with sda missing so you don't lose your data
mdadm --create /dev/md0 --level 1 --raid-devices=2 missing /dev/sdb1
and so on for the rest of your partitions
mdadm --create /dev/md1 --level 1 --raid-devices=2 missing /dev/sdb2

make your file system
mkfs.ext3 /dev/md0
mount it
mount /dev/md0 /mnt
copy your data
rsync -avz / /mnt
now edit /mnt/etc/fstab and change your mounts to the appropriate /dev/mdx devices that correlate with your /dev/sdax devices
then edit /mnt/boot/grub/menu.lst (or whatever your grub.conf file is) make sure to replace /dev/sda with /dev/md
now you need to install grub on /dev/sdb so something like
grub-install /dev/sdb or do the manual grub install dance
reboot and pray
once the system comes up you just have to add in your missing devices (since we created the raid1 with sda missing)
mdadm --add /dev/md0 /dev/sda1
mdadm --add /dev/md1 /dev/sda2
and so on for your partition
then dont reboot until cat /proc/mdstat show that all your raid devices are properly synced

and so on for each of your partitions
dont forget to mkswap on one of those md devices



custangro was that process never covered in the RHCE? or am I just missing some obvious piece of information that makes it impossible to migrate to raid1?


Sorry for such a sloppy post its been a year or so since I've gone through the process and I dunno where my notes are. But unless there is some black magic to do with RHEL vs Centos, gentoo, or debian (i've done done migrations on all three) it is possible.
 
Old 07-13-2009, 12:59 AM   #5
cmdln
Member
 
Registered: Apr 2009
Location: Lawrence, KS
Distribution: Debian, Centos
Posts: 108
Blog Entries: 1

Rep: Reputation: 25
Quote:
Originally Posted by jschiwal View Post
If your system uses LVM2, you can add a hot spare. This will give you the same redundancy protection as a RAID 1 array.
Jschiwal, if he had a hot spare and his non-redundant single disk failed how would the hot spare get activated? To my knowledge it only gets activated on write failures then starts migrating the data over. I would not say thats the same protection as RAID 1 where you have full redundancy as long as the mirror is in sync.
 
Old 07-15-2009, 12:48 AM   #6
narender1762
LQ Newbie
 
Registered: Jul 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks all. The scenario is that The server is having 750Gb SATA HDD. During installation of RHEL 5.3 server I selected default installation

Now if you see with df -l

It say VOLG00 something like that and other two logical partitions on sda1 and sda2 but the 2nd disk is like sdb1 and says free space

with regards
naren
 
Old 07-15-2009, 07:14 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681
cmdln: Thanks for the correction. Meant to type LVM Mirror.

I like your solution: create a raid-1 array (on the second drive) with a missing drive, copy the files to it, add first drive to array.

Last edited by jschiwal; 07-15-2009 at 07:19 PM.
 
Old 07-15-2009, 08:43 PM   #8
narender1762
LQ Newbie
 
Registered: Jul 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Hi all

Thanks a lot. I have learn how to build software RAID1 on RHEL 5.3 server and have also checked by swaping the HDDs one by one

with kind regards
naren
 
Old 11-17-2009, 02:12 AM   #9
bicolano53
Member
 
Registered: Sep 2004
Location: Philippines
Distribution: red hat linux enterprise 4
Posts: 34

Rep: Reputation: 15
Quote:
Originally Posted by narender1762 View Post
Hi all

Thanks a lot. I have learn how to build software RAID1 on RHEL 5.3 server and have also checked by swaping the HDDs one by one

with kind regards
naren
Could you pls share the procedures or email to me..bicolano53@yahoo.com
thanks
 
Old 11-17-2009, 05:31 PM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,307

Rep: Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743
LVM cmds http://www.linuxtopia.org/online_boo...orage-lvm.html
LVM howto RHEL 5 http://www.linuxtopia.org/online_boo...l5_ch-lvm.html
LVM HOWTO http://tldp.org/HOWTO/LVM-HOWTO/
 
  


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
Linux Red Hat 5 Enterprise installation without X Windows quz Linux - Newbie 3 11-28-2008 04:44 PM
How to configure Emulex HBA in Red Hat Enterprise Linux 5 tiluoi Linux - Newbie 1 11-12-2008 08:18 AM
Software RAID in Red Hat Linux Enterprise 4 DataSheet Linux - Enterprise 4 04-24-2006 02:03 PM
Red Hat Linux Enterprise Installation Steps avinash_vas Linux - Software 4 09-04-2004 06:14 PM
Installation doesn't recognize Red Hat Enterprise Linux ES installation cd bizkut Red Hat 2 08-15-2004 08:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:23 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