Monday, December 7, 2009

The ultimate media storage solution

I am the kind of person that has trouble making decisions in little things, and I am also the kind of person that hates a messy file system, so when I ran out of room on my media PC, I had to add another HDD to the machine to store more data, which presented a problem for me.

You see, I already had two other disks in the machine for storage, a 500GB and a 1TB disk, which were already fairly well sorted with all of my movies on the 500GB, and TV Shows on the 1TB. But adding a third disk would mean that I would have to split my TV Shows onto the third disk making it harder to manage since I would have to hunt for the show I would want to watch between the two disks.

The only solution I knew of to this problem was a RAID1 (stripe) array, which would combine all three disks into one huge disk... but there are issues with this, the partitions could only be as large as the smallest disk (500GB), and if one partition/disk is lost, all the data is lost.

I was just about to give up when I remembered something I read somewhere a while ago called LVM, or Logical Volume Management. I was investigating it for server backup since I manage multiple servers at work with 99.99% uptime requirements. LVM is very promising for that too, but it was perfect for this as well.

You see, LVM is a layer of abstraction on top of the physical hard disks, sort of like Virtual Memory, where the operating system and software see 2GB of RAM available, but you only have 1GB of physical ram, and a 1GB swap partition on your HDD.

I was able to combine all three disks into one huge volume, and it was so easy to do too. Here is the df output of my media machine now (note, as of writing, 2TB is the largest HDD available on the market).

# df -H
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 39G 13G 27G 32% /
tmpfs 1.1G 0 1.1G 0% /lib/init/rw
udev 11M 762k 9.8M 8% /dev
tmpfs 1.1G 4.1k 1.1G 1% /dev/shm
none 1.1G 4.1k 1.1G 1% /dev/shm
/dev/mapper/skx--vol-BulkData
2.5T 1.2T 1.3T 49% /media/BulkData


To set this up is very simple... instead of re-writing a whole bunch of info though, I will point you to an excellent beginners guide to setting this up on a machine that has already been installed and configured.

I highly recommend LVM for a media machine, it is so nice to have all my data in one location, and not have to think about where to put things, or where I out them when I want to watch them.

1 comment:

  1. This has all been deprecated in favour of 3x 2TB disks in a RAID5 array, giving a total of 4TB of usable space and redundancy.

    ReplyDelete