LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Config a new software RAID 1 (Fedora 6) (https://www.linuxquestions.org/questions/linux-newbie-8/config-a-new-software-raid-1-fedora-6-a-591010/)

marmen 10-11-2007 04:35 AM

Config a new software RAID 1 (Fedora 6)
 
Dear All:
I currently install fedora 6, that is working great. The problem is
I bought a new sata hardisk (same size same brand), and want to do a software RAID 1.

How can I do it??
I am stuck in there~~
This is my existing config

[root@testmail postfix]# df -m

Filesystem 1M-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
293613 3420 275038 2% /
/dev/sda1 99 11 83 12% /boot
tmpfs 502 0 502 0% /dev/shm


--------------------------------------------
[root@testmail postfix]# fdisk -l

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 38913 312464250 8e Linux LVM

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 38914 312571223+ 8e Linux LVM

Disk /dev/sdc: 2048 MB, 2048728064 bytes
64 heads, 63 sectors/track, 992 cylinders
Units = cylinders of 4032 * 512 = 2064384 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 1 992 1999749+ 6 FAT16


Thanks for your help~~~

vedang 10-11-2007 07:05 AM

RAID1 morror in fedora
 
You are going to configure RAID1 morror volume based on software.
There are 2 utilities avalible to accompalish this.
1. mdadm which in inbuilt tool with redhat and fedora systems.
2. raidtools third party tool to configure software based raid.

I recommend you to use mdadm, beacuse it is easy to configure and stable.

I assume that you have two hdds like sda and sdb

create exactly same new partitions on both hdds. so it will come to dda3 and sdb3 .

next go to fdisk tool and change partition id of both new partitions to fd.
fd stands for raid autodetect.

Now make RAID1 (morrored ) array of thesetwo partitions.

use following command to do it.

#mdadm -v -C /dev/md0 -l1 -n2 /dev/sda3 /dev/sdb3

This command will create a RAID1 mirrored array called /dev/md0.
Then create filesystem on RAID array.

#mkfs /dev/md0

Now RAID1 array is created and is functioning properly. You can mount it now.

#mount /mnt/dir1 /dev/md0

Now whatever data you write in /mnt/dir1 directory will be written on RAID1 array.

To test RAID is created successfully, run following command.

#cat /proc/mdstat

Also

#mdadm -D /dev/md0

Now create a directory /data in which we will mount /dev/md0 RAID1 array.

Above command will create filesystem on it.

Then add this entry in the /etc/fstab file to start morror after rebooting.

#vi /etc/fstab

add line as following.

/dev/md0 /data ext3 defaults 1 1


Save and exit.


All times are GMT -5. The time now is 11:08 PM.