Debian NAS

I wanted a centralized home storage system that could feed all my other toys. Data stored on this will include MySQL datafiles, our MP3 collection, website directories and all our receipts printed out in PDF format (Yay! CutePDF) among other things. And so the fun began…

I did some test installs of various “turnkey” solutions such as Openfiler.

Openfiler just didn’t seem stable enough. Arrays would claim to have faulty drives and start rebuilding the arrays at the strangest times. Only to find out, via 3rd party tools, that the drive was fine. The web interface was ok but I would have organized it differently. Minus that, Openfiler has a lot of potential.

In the end, for what I wanted, it was easier to do a netinstall of Debian and add the things I needed.

Started with this: Debian RAID

Changes:
Raid5 first
Raid1 with leftovers
Flat filesystem
Swap on Raid5

Problems:
Bad mainboard
Bad harddrive
BIOS truncation of HD hardware address forcing me to "find" the bootdisk manually.

Hardware:
ECS RS482-M754 w/ AMD Sempron 3200+ (Bundled)
4x Seagate Barracuda 7200.10 ST3250620AS 250GB
2x AllComponents 512MB 184-Pin SDRAM DDR 400

The mainboard had problems POSTing but I couldn't really determine if it was board, memory or CPU, so it (board, memory and processor) was replaced with:

MSI K9AGM2-L AM2 AMD 690V Micro ATX
AMD Sempron 64 3400+ Manila 1.8GHz Socket 754
2x Kingston 512MB 240-Pin SDRAM DDR2 800

Ended up having a dodgey harddrive too. Awaiting the RMA return. But that didn't stop the project, it's just running without a spare at the moment.

NFS with assigned ports: Securing NFS

This is used for our websites' files and MP3 collection. The MP3's are accessed internally via Jinzora and accessed via laptops, HTPC's etc.

Samba:
9 times out of 10, we're accessing the NAS interactively from laptops running windows. I didn't really look for a site that explained how to setup Samba on Debian. Just knit picked around google until my shares were up and running.

AoE for database files: AoE on Debian

First, the above URL is not quite complete, it's missing a few steps, which I have outlined below.

There are some security risks one should be aware of when implementing AoE. One item is the ability to X-mount an AoE LUN on another server causing corruption and all sorts of other nastiness. I've heard there are certain implementations that allow MAC filter and other security mechanisms to make this more secure. But in the end, you will still be shipping data in the clear over the wire.

I decided the ease of use were worth the risks.

Given that data files were going to live on the AoE devices, I wanted some extensive, longterm testing. I kept the originals and did some link chicanery for the test.

As I stated earlier, the AoE How-To linked is not complete but still makes a decent starting point. Below is a quick step-by-step.

Keep in mind the initiator is the "client" and the target is the "server". These are Debian specific instructions.

Initiator:
Install the client tools
apt-get install aoe-tools

Create the /dev structure
aoe-mkdevs /dev/etherd

Target:
apt-get install vblade

Create a device to export
lvcreate -n myAoE --size 10g my_vg0

Export device in userland for testing
vblade 0 1 eth1 /dev/my_vg0/myAoE &

Initiator:
aoe-discover

List AoE devices
aoe-stat

Create filesystem on device
mkfs.ext3 /dev/etherd/e0.1

Mount our new AoE device
mount /dev/etherd/e0.1 /data

And there you have it. In the end, I have 500GB of usable space in the first array. This includes a spare. All told, $415 delivered from NewEgg.

Next, I will be adding 4x 500GB drives for another array. At the current prices, you just can't beat the $ per GB.

One thought on “Debian NAS”

Comments are closed.