Find the answer to your Linux question:
Results 1 to 4 of 4
I am working on building a file server to store all of my movies so that I can pull them up on my different machines using Boxee. I have (3) ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2010
    Posts
    2

    CentOS: trouble setting up a RAID


    I am working on building a file server to store all of my movies so that I can pull them up on my different machines using Boxee. I have (3) 1Tb drives attached to a SATA controller and I want to setup a software RAID 0.
    Here is what I have done thus far:
    created a /etc/raidtab
    Code:
    raiddev /dev/md0
                 raid-level          0
                 nr-raid-disks     3
                 persistent-superblock   1
                 chunk-size        4
                 device               /dev/sdb
                 raid-disk           0
                 device               /dev/sdc
                 raid-disk           1
                 device               /dev/sdd
                 raid-disk           2
    *** device /dev/sda is my main boot drive which is a 250Gb SATA drive connected straight to the motherboard***
    I then used mdadm to create the array
    Code:
    mdadm --create /dev/md0 --level=0 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd
    I created a mdadm.conf file at /etc/mdadm/mdadm.conf and used mdadm -Es to add the new RAID
    Code:
    mdadm -Es | grep md0  >>/etc/mdadm/mdadm.conf
    next I formated the new device with mke2fs
    Code:
    mke2fs -j /dev/md0
    I created a directory off of root for the files and mounted the device
    Code:
    mkdir /videos
    mount /dev/md0 /videos
    Finally I added it to my fstab
    Code:
    /dev/md0      /videos      ext2       defaults    0  0
    When I reboot the machine fails to mount the device when I run cat /proc/mdstat the raid device is no longer running.

    I am not sure where I am messing things up, can anyone point me in a direction?

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    i'd recommend against raid0, since when a drive will fail you will lose all data and this isn't any fun, i would just mount each drive individually under one directory like videos/drive1,2,3 instead

    perhaps if you'd like to have one big thing you can look into LVM, though I'm not sure if that would have the same problem when a drive fails

  3. #3
    Just Joined!
    Join Date
    Jan 2010
    Posts
    2
    Well I would have liked to get it running as a RAID 0 but I think due to time constraints I'll go ahead and use each drive separatly. My 250Gb drive in my windows machine that is currently holding my videos is running a little short on space. So I'll split it up as such.
    /dev/sdb /videos/new
    /dev/sdc /videos/viewed
    /dev/sdd /videos/temp

    I guess I can do everything by just doing the last couple of steps and useing the sd's instead of the md.

  4. #4
    Just Joined! imtiaz's Avatar
    Join Date
    Sep 2006
    Location
    Dhaka, Bangladesh
    Posts
    3
    after creating the RAID, you need to save the raid info in mdadm.conf so that it starts automatically after reboot.
    Code:
    mdadm --detail --scan >> /etc/mdadm.conf
    Now, you raid should come up after reboot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •