LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   to configure RAID 1 on Red hat Enterprise Linux after installation of operating syste (https://www.linuxquestions.org/questions/linux-newbie-8/to-configure-raid-1-on-red-hat-enterprise-linux-after-installation-of-operating-syste-739646/)

narender1762 07-12-2009 11:07 PM

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

jschiwal 07-12-2009 11:16 PM

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.

custangro 07-12-2009 11:27 PM

Quote:

Originally Posted by narender1762 (Post 3605636)
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

cmdln 07-13-2009 12:45 AM

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.

cmdln 07-13-2009 12:59 AM

Quote:

Originally Posted by jschiwal (Post 3605643)
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.

narender1762 07-15-2009 12:48 AM

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

jschiwal 07-15-2009 07:14 PM

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.

narender1762 07-15-2009 08:43 PM

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

bicolano53 11-17-2009 02:12 AM

Quote:

Originally Posted by narender1762 (Post 3608943)
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

chrism01 11-17-2009 05:31 PM

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/


All times are GMT -5. The time now is 06:42 AM.