Build your own terabox

Home

General tips

Select the hardware

Start with the RAID card
It will end up being a major cost factor, and will likely be the bottleneck for disk I/O. It is also going to limit the number of drives you can fit in your array, and the RAID schema available to you.
Drives
You should probably avoid IDE (PATA), because the master/slave setup will destroy your read and write times. Go with SATA. SCSI is probably too expensive. SCSI's strength is in its performance, not its capacity. You're building a storage server - go with SATA.
Do some shopping around. Find the best G/$ ratio. Figure out the average cost of a 750GB drive, then take 750/cost. Do the same for 1TB drives (1000/cost), and whichever has a higher ratio is the better value. I recommend always buying drive sizes of the best value.
Power Supply
Contrary to popular belief, the maximum wattage of a power supply doesn't mean much. Wattage is a factor of voltage and current, and current is the important number. That being said, it's hard to find a power supply that can't handle a hard drive on each power connector. Don't use splitters and you'll be fine. Just make sure you get a power supply with enough connectors to plug in all your drives.
If you are using power splitters (or backplanes, same idea) there are some general guidelines to follow. Your average hard drive will need 20-30 W to idle, and will peak around 40-50 W. You'll definitely want a beefy power supply.
There are some wattage calculators out there that can help give you some idea of what wattage range you should expect. They vary a lot, but I've found two that should give you some idea of your system's range.
Treat this as your system's power usage in watts when idle.
Call this your system's peak power usage in watts.
Case
Airflow is important, especially considering how many drives you'll have in there. An ATX full tower is recommended, and look for one that supports large fans (>=120mm). Larger fans will move more air, make less noise, and typically live longer. Also, I wouldn't advise skimping on the case, unless you enjoy using tin-snips and a hammer to install expansion cards. Spend a little extra and you'll be glad you did.
Backplanes
Backplanes are unnecessary, but I love them. You don't have to open the case to replace a drive, and you get some flexibility with the number of drive bays available in the case. Not only that, but most backplanes include a rear exhaust fan that assists with the front-to-back airflow in your case.
Motherboard
This doesn't matter too much. A few slots for expansion cards is good, since you may end up with more than one RAID card a year from now. You should get on-board SATA connectors so you can attach a stand-alone drive (faster than IDE/PATA). You won't be using any fancy graphics, so get on-board video or you'll need to waste an expansion slot on a video card, and on-board video is cheaper.
Processor
If you're getting a true hardware RAID card with its own CPU and on-board RAM, your system processor won't matter. Get something cheap, but try to avoid anything that runs hot. While you're thinking processor, you might look into processor fans and heatsinks. Try to find one that doesn't interfere with the air flow within your case.
RAM
As with the processor, unless you're using software RAID this doesn't really matter. Get something cheap.

Partition the array

Many formatting and partitioning tools have size limits, but with the right tools you're really only limited by the maximum size of your filesystem*. The secret to creating a huge partition is the Gnu Partition Table (GPT). The following is how to create one using 'parted'. For the purposes of this example, we'll assume your array is /dev/sda, and that you want the whole device to be one partition.

parted /dev/sda
Open device /dev/sda in parted.
mklabel gpt
Create a new disk label (partition table) of type GPT.
mkpart
Create a new partition.
primary
Specify the type of the new partition.
0
Specify the starting position of the partition. 0 is the beginning of the disk.
-0
Specify the end of the partition. Negative 0 is the end of the disk.
quit
Exit parted. You'll now have one partition the size of your entire device.

* There are too many complexitites to file systems to get very in-depth here. For easy reference, check out the comparison of filesystem limits table on wikipedia.

Format the partition

Spend some time considering your filesystem of choice, and look closely at the options available when formatting your partition. There are a few things you can do to improve performance (especially in regards to chkdisk or fsck). Here's an example of a command used to format a 4.5 TB partition as ext3:
mke2fs -j -b 4096 -m 0 -T largefile4 /dev/sda1
And this is what it means:

mke2fs
Invoke the mke2fs utility to create an ext2/ext3 partition.
-j
Create a journal. The presence of a journal means this is ext3, not ext2.
-b 4096
Set the block size to 4096 bytes (max for the mke2fs binary). To exceed, add the -F flag to the end of your argument list.
-m 0
Ext3 reserves 5% of the disk for the root user by default. On a data partition this is pointless, and 5% is a lot of wasted space on a terabox. Use this command to reserve 0% for the root user.
-T largefile4
Create only 1 inode per 4 MB. On a huge partition, you'll probably have lots of large files. In that case, more inodes will just slow down formatting, mounting, and fsck-ing.
/dev/sda1
The partition you're formatting. You probably just created this partition using parted as described above.

Home