Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Mar 2004
    Posts
    193

    Default Software RAID 1 (mirror) CentOS 4.2 64bit

    Has someone a good tutorial for setting up a software raid 1 in CentOS 4.2 64bit?

    Thanks a lot

  2. #2
    Member
    Join Date
    Mar 2004
    Posts
    710

    Default

    What software is good for creating a RAID? That is usually hardware and needs no setup, except in the BIOS of the machine. Hardware is definitely the way to go.
    Last edited by lloyd_tennison; 02-05-2006 at 06:35 PM.
    Lloyd F Tennison

  3. #3
    Member
    Join Date
    Mar 2004
    Posts
    193

    Default

    There is already RAID software in CentOS (/etc/raidtab).

  4. #4
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Search the web for some tutorials. A good one (with other useful server admin guides) is:
    http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  5. #5
    Member
    Join Date
    Sep 2004
    Posts
    422

    Default

    Software Raid is a great thing - running / software raid on all of our servers without any problems and hassles that come associated with Hardware raid rebuilds and cards that die etc.

    I use a live cd to do installs but setting up RAID 1 is a pretty simple task - I use mdadm

    The setup on redhat/centos is much the same as any other distro,

    Basically this is what you need to do with a new install, using cd

    Partition the disk as you would like, make sure to partition each disk the same. Select linux software raid as the file system type. Do this for every partition that you want tobe in raid1.

    Then, select create raid device, select the level, raid 1, then select the 2 partitions that you created earlier, eg.

    /dev/sda1, /dev/sdc1
    /dev/sda2, /dev/sdc2

    Then, go through each RAID device that has been created and enter the mount point and select the file system type,eg /boot , ext3 bootable. Do this for each partition - Its really straight forward and there are tons of tips on google if you get stuck.

    If you have a live cd, then I usually create the partitions, create the raid devices and install debian into it using debootstrap

    Bit like so,

    Partition /dev/sda, make all partitons type fd (linux raid , autodetect.

    Then dump the partition table

    # sfdisk -d /dev/sda > sda.sf

    Edit the file sda.sf and change, sda to sdb, wherever it occurs.

    The use that to create the partitions on the second disk

    # sfdisk /dev/sdb < sda.sf

    Right, now to create the raid devices and format the disks

    # mdadm --create --level=1 --raid-devices=2 --spare-devices=0 /dev/md0 /dev/sda1 /dev/sdc1

    Change /dev/md0 and the sdax sdcx as needed, for each partition, so you end up something like this

    /dev/md0 - /dev/sda1 /dev/sdc1 - mount point /boot
    /dev/md1 - /dev/sda2 /dev/sdc2 - mount point /
    /dev/md2 - /dev/sda3 /dev/sdc3 - mount point /var

    and so on

    Once the raid devices are created, just format them

    # mke2fs -j /dev/md0

    # mke2fs -j /dev/md1

    # mke2fs -j /dev/md2

    # mkswap /dev/mdx (whichever you choose for swap, if you include that in the raid.

    To view the created raids,

    # mdadm --detail --scan

    # mdadm --detail --scan > mdadm.conf

    If you want to create a mdadm.conf

    # cat /proc/mdstat

    Will tell you how the raid devices are doing.

    Then you can mount them,

    # mkdir /target

    # mount /dev/md1 /target
    # mkdir /target/boot
    # mount /dev/md0 /target/boot

    and so on...

    Installing debian couldn't be easier from there, but then this is the cpanel forums and we won't go into that one.

    I would also advise using/compiling a kernel that has compiled in raid 1 support, rather than using a module and initrd...

    Software raid rocks!
    Last edited by DigitalN; 02-07-2006 at 04:02 AM.

Similar Threads & Tags
Similar threads

  1. Munin WHM plugin in 64bit CentOS 5.5
    By yoachan in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-26-2010, 08:11 PM
  2. VMware VM Centos 64bit / Cpanel WHM
    By webstyler in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-14-2010, 03:12 AM
  3. cpanel pro on centos 64bit
    By phiber in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-06-2008, 03:25 PM
  4. cPanel with CentOS 4.5, 64bit ?
    By SoFiMaN in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-03-2007, 09:53 AM
  5. CentOS 4.4 64Bit
    By WireNine in forum cPanel and WHM Discussions
    Replies: 15
    Last Post: 04-19-2007, 09:03 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube