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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
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 !

   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.
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:

It's for RedHat 9. Very useful.


Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

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.

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

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,

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

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):
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
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 ?

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 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 I can provide u.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.