Home Media Server Project

I set out to build a versatile and resilient mediaserver to house my media. Movies, Music, Documents, etc. I wanted to build something that had RAID support for fault tolerance and enough space to hold my data as well as be able to expand size later on if needed. Right away I started to compare RAID solutions. Should I go with hardware RAID cards? Software? Which RAID level?

After doing some googling and research, I discovered what I needed. Software RAID using mdadm. mdadm is a linux app that provides a very robust and versatile RAID solution for linux. I was attracted to it in particular for it’s growing RAID feature, a feature that would allow me to carve a certain size RAID (5GB) and if needed later on grow it to a larger size (10GB) without having to copy my data off and back onto the RAID logical drive. Keep in mind for your own RAID project, I did not find any Hardware RAID solutions that were in my price range, most cards of that caliber where in the $1,000 dollars.

Second, choosing a RAID level. Now for more info on RAID levels see this site. The toss up was between RAID 5 and RAID6, both of which give me a high level of fault tolerance at minimal cost( cost being drives designated as parity drives, see RAID wiki for more info). I decided on RAID 6 to give me the added fault tolerance up to two(2) drive failures. I figured if I am going to spend the money and build this media server to house all my stuff, I might as well make it kick ass!

Physical set up

  1. 4U NORCO with 20- bays
  2. Gigabyte GA-990XA
  3. LSI 9211 RAID Card PCI-X (8 SATA via 2 multi-lane ports)
  4. Multi-lane cables 
  5. DDR3 -1866 GSkill
  6. AMD FX-6100 3.3GHz 6-core
  7. CORSAIR 750W PSU

Now deciding on drive sizes. Keeping in mind RAID 6 calculation of total space is ({drive_size}*{num_of_drives- 2}). Meaning you sacrifice 2 drives for RAID 6. For RAID 5 it is the same calculation except minus 1 (n-1). Keep in mind that if you mix drives with different capacities, you are limited to the lowest capacity, for example 3 drives(1TB,1TB,500GB), your RAID5 would only 1TB, effectively wasting the other. (Which could be partitioned for other things, etc. Anyway..

I choose 1TB drives. So by theory, the most highest capacity I can use with regards to physical space (20-bays) is 20TB-2TB = 18TB of capacity. Which I thought as plenty. My alternative at the time was 2TB which would equate to 40TB-4TB = 36TB, whichI thought was overkill.

Last Item: 1TB 7200rpm Western Digital HD, now keep in mind, do not purchase green drives! I’ve read countless times that people who tried to incorporate Green drives such as Western Digital 5400RPM Green, into their RAID solution had the drive fail within the first months. I have nothing against these types of drives, as they are very good at low power consumption, etc,etc. However my research shows that they may fail sooner than non-Green drives. Just my $0.02.

Putting it all together.
IMAG0185 IMAG0186IMAG0188
IMAG0189IMAG0192 IMAG0200

Moving on to the OS install and software piece.
I decided to use Ubuntu 12.04.1 64-bit Server edition as my OS. I’ve used Ubuntu server before and am fairly familiar with it. It is a Debian based distribution, you can easily use a Red Hat or SUSE based distribution as the software I am using is compatible with all flavors of Linux.

I also will be using mdadm for my software RAID. I chose a software RAID because my current set up is limited to a 8 drive max RAID configuration, because of the PCI card I bought. mdadm also makes it very easy to expand/grow a RAID filesystem, for example when adding more drives to an existing RAID Disk Array. So, if I were to buy a SAS expander or another RAID card, I can use mdadm to mark the drives and add them to my already existing Disk Array.

  1. Install mdadm.
  2. Verify all drives have been recognized by Linux.

    Each drive should have a /dev/sdX which is how Linux references it.
  3. Partition drives (optional, do for each drive)

    Create a new Primary 1 partition and choose type fd
    fdisk1

    fdisk2

    fdisk3

  4. Verify parition on all drives by issuing an.

    Under the System Column it should state Linux raid
  5. Creating the Disk Array with mdadm. (/dev/md0)
  6. Partition and Format the disk array device using parted(/dev/md0).
  7. Install sharing software and or streaming software. (samba, daapd, etc.)

That’s pretty much my home mediaserver project. I’ve left out some steps because I have other posts on my website that includes them such as, creating a software RAID with mdadm, setting up samba and daap server, music cloud, iSCSI, and a post regarding recovering from failed drives.

Sources:

Leave a Reply