[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1083
  • Last Modified:

How to set RAID 1, with new HDD in Redhat 9

I want to set RAID1 to mirror my existing ATA HDD with new ATA HDD of same capacity in Redhat 9.
Help!
0
rajeevsrivas
Asked:
rajeevsrivas
3 Solutions
 
rindiCommented:
If you have a ATA Raid controller you should be able to do that while booting the system. You will just have take the 2 drives into your raid then be carefull to give the correct drive as the drive with the data source. Before creating the raid be sure to read the docs on the raid controller and also install the linux drivers for this controller.
0
 
aashishkunteCommented:
hi rajeevsrivas ,

            Do you want to make RAID 1 implimintation on installation time  or after installation ?


     1) At the time of of installation u go for disc druid option for  manual partitioning .  on that gui based utility is there through just select on filesystem tag u need to select RAID drive  
     2)  If  u have installed linux then there are  two utilities  Fdisk of partd
            using fdisk is more easier and i preffered ...  make new drives  and with t option make filesystem to raid
            ie convert it into software raid drives  ( 0xfd is the hex code for software raid auto detect)
       3) Now when u made drives with RAIDFS i.e. RAID file system format it with ext3 fs  by mke2fs
        4) edit /etc/raidtab  to define /dev/md0(md is raid volume representations)
                 mention raid level 1  , nr-rqaid-discs  = 2 ,  chunk-size 32, superblock 1 , and parity-algorithm
                              device       /dev/hda<raiddrveno>
                               raid-disk 0
                               similar for  raid disk 2  

    to check your  configurations you can use  lsraid ,  mdstat .
                5) you need to mount your raid drive to use it will generate automatically  mirroring or stripping pairity!  

 stay relax to your data  and enjoy !
 
0
 
wesly_chenCommented:
Hi,

   There is hardware RAID and software RAID.
For hardware RAID, you need have ATA RAID controller chip or card.
rindi has mentioned the way to do hardware RAID.
However, Linux treat match device name with IDE controller, so you need to be careful.
Say,
your original hard disk is in primary master --> /dev/hda   <=== original hard disk
primary slave ---> /dev/hdb
secondary master ---> /dev/hdc
secondary slave  ---> /dev/hdd
---- change to
For extra ATA RAID controller card,
 primary master --> /dev/hde   <=== Put original hard disk
 primary salve  ---> /dev/hdf    
 secondary master --> /dev/hdg  <=== put new hard disk
 secondary slave   --> /dev/hdh
------------------------
Those drive letter need to change in /etc/fstab, /boot/grub/grub.conf
or you linux box won't boot after you change your hard disk to RAID controller.

For software RAID, it's implement in partition level.

You might want to check the following URL:
http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/s1-raid-approaches.html

It's for RedHat 9. Very useful.

Regards,

Wesly
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
rajeevsrivasAuthor Commented:
I am sorry, I m asking for software RAID.

I m already having Redhat 9 running on ATA Hardisk. Now I want to add new Hard disk and do RAID1.

0
 
wesly_chenCommented:
>> For software RAID, it's implement in partition level.

http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/ch-software-raid.html

You can put your new hard disk in and boot from CD-ROM (RedHat Linux 9) and choose upgrade and "manual run disk druid".
Then you will go to the GUI to setup disk partition as the RedHat document said above.

If you want to manually do it, then "aashishkunte" already said it.

I would like to double emphasize that "software RAID is implemented in PARTITION level".
So if you have multiple partition in you original disk, then you need to create the same amount of partions on the new disk (thesame partition size, too). Make software RAID on each partition one-by-one and step-by-step.

For the whole disk RAID 1, buy a RAID controller and do hardware RAID is easier and faster (software slow down the performance).

Good luck,

Wesly
0
 
aashishkunteCommented:
do u want fdisk options


                fdisk /dev/hda

           then u press p will show u partition list !

  n will create new partition t will convert filesystem  l will show u supported file system list

 
0
 
marcin79Commented:
If I understood correctly You have up and running system and You want to add a mirror to it - software mrror. BE WARNED THAT PROCESS OF ADDING A NEW DRIVE MIGHT BE DANGEROUS, but on the other hand i've st up few such configurations and they are working correctly till now.

Be warned that you might face a few other problems:
you will need to boot from a raid-1 software array and you have to place a root ('/') partition on a raid-1 software array

I think You should read this first (and read it twice before proceding):
ftp://ftp.bizsystems.net/pub/raid/Boot+Root+Raid+LILO.html
and remember it *might* be a little outdated - but not very much. Even if its very outdated you will get the trick after reading it.

Hope that helps
Marcin
0
 
aashishkunteCommented:
Have u tried making partitions ?  and convert it intoRAID Drives And then  Ext3 FS installation ?
            The raidtab File in /etc is not present by default you need to write at your  own
 do u want raidtab file structure ?

             
0
 
rajeev1963Commented:
Wesly_chen and aashishkunte has provide you the solution, but i m giving another alternative.

Add new hard disk of same size and make partitions in new disk of same size as in primary hard disk.

now download free software mirrordir. Install this rpm package.

mkdir -p /mirror

mount /dev/hdb2 /mirror/

mirrordir / /mirror/

umount /mirror

similarly you can do with hdb1 (boot) partition.

Then make one mirror.sh file in usr/local/sbin
and cron it atleast every hour.
The advantage is that it only updates files, and incase primary harddisk fails secondary hard disk can be used as primary hard disk.

If you want mirror.sh I can provide u.



0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now