Any day you learn something new is a good day

Christmas Projects - One down, one to go

, posted: 28-Dec-2009 11:20

The Christmas break is here - except that I'm on call and can't leave town or turn my damn BlackBerry off.

Oh well, since that's the case it's time to work on my projects for the break.  I've got two to do - build a retaining wall & build a SAN for my computer room.

As I'm a dyed-in-the-wool geek (duh!) I've started with building my SAN....  outside jobs can wait...

So, four 1TB drives later (three Samsung Spinpoint's from and one Western Digital I've got the bones of a SAN ready to assemble.

Deciding on the OS for the SAN was the hard part - I fiddled around with OpenFiler & Freenas.  OF is the best for a dedicated SAN - you can recover a failed raid onto a different (or newly added) disk pretty easily, but it's user management is a tad hard if you want to use it as an SMB server.

Freenas is pretty, has some really nice features like being able to show the drive temperatures in realtime, but feels like the 'Hasbro My First SAN'.

That said, I decided to use Freenas as it's easier to administer.  I'm not so sure on how good the RAID will be over time, but I'll stick with it and see how it goes.  Failing a drive isn't too hard to fix - the replaced drive *NEEDS* to go back onto the same cable the dead one came off. Other than that, all good. (Though I forgot to label the drive cables before building the array... duh!)

It's sitting in an IBM celeron 2.8ghz box with 1GB RAM. Freenas boots from CD during installation and has an 'install to USB key' mode which I've used.  Using a USB key as the boot device and OS partition means that I don't have any swap memory available, but as I'm only enabling SMTP alerting, CIFS and NFS I won't be using too much of the 1GB RAM. Freenas is currently based on FreeBSD so it's pretty good on managing it's ram.

Now I've got 2.8TB of available space to throw stuff on.  My MythTV boxes now have all my CD's ripped to MP3 available to them all (50GB's worth @ 192kbps VBR) and all the movies I've been recording off Freeview and exported to xvid's are up as well.  So far only 360GB in use, but it's a start.

I'm going to be purchasing a 2TB drive and stick it into an external case and hang it off the SAN for backup purposes - Freenas supports rsync jobs, so I can set up the external drive as an rsync destination and set a schedulled job to back the raid5 up to the external job at night.

Next year Freenas is going to be rewritten under GNU/Linux so I'll back it up, rebuild it and start again (and this time label the damn drive cables....!)

Woo hoo - one job down.

Next up, digging the dirt out for a retaining wall....  bummer.

Other related posts:
Extending the CEPH cluster, things we've learnt
Creating redundant, clustered & scalable storage - a DIY guide
Building A Win8.1 based Chromebook - A How To

Comment by nate, on 28-Dec-2009 14:58

Good post, wish I had to expertise to setup a SAN :/

Author's note by nzsouthernman, on 28-Dec-2009 16:40

@nate - Thanks for your comment! :)

it's not too hard to build a SAN - just some hardware and free software. The biggest & most important task is to decide what you actually want to do with a lot of accessible storage; share storage amongst your home PC's, use it as iSCSI disk for your ESX server, whatever.

Once you know what you want to achieve, then you can pick the product to use to set it up.

The three (free ones) I've had the most experience with are unRaidOS, Freenas and OpenFiler.

If you want to have a crack at building something for yourself, read up on them ( ; ; ) and pm me with your email address if you get stuck or want to ask questions. Or reply here and we can have an open discussion for others to comment on too. There'll be heaps of other GZ'rs who have done this as well that can offer their ideas.

Comment by Craig, on 1-Jan-2010 10:57

I've also gone through this process. My requirements were a little different. I had an old Athlon XP 3500+ machine sitting around. So I've stuck an additional SATA controller in there, added 4 1TB drives to the onboard SATA controller for RAID 5, and used the additional controller for my spare HDD as boot. I'm also going to be adding a new Intel NIC to the mix to speed up access times. Currently writing max burst 50mb/s - want that up at around 80 at least. As a point to note, I've run some tests - and the software raid 5 array writes at about 150mb/s - which I thought was pretty fantastic. The system itself is setup with a main data share - and a single iSCSI target for TimeMachine backups. Once you've worked out the intricacies of openfiler's admin - it's all easy going. I have a couple of VM's running it first so I could test scenario's before making a final decision. I also compiled a copy of TransmissionBT on one of the VM's, and moved that across to my openfiler box - along with some scripts and other bits and pieces to get broadcatching working etc. So, now I've ended up with a NAS, that also managed my torrent downloads. Took me a good 2 weeks to get everything sorted - but it's totally worth it in the end. :)

Author's note by nzsouthernman, on 4-Jan-2010 16:19

@Craig - good to hear you've got sweet speeds up like that!
OF's iSCSI support is excellent - I had a couple of ESX servers sharing an iSCSI LUN off OF and it ran really well for ages. (Until drives died like flies on the server I was using thus rendering it d.e.a.d.).
Do you know if your internal & additional SATA controllers are SATA-1 (1.5gbps) or SATA-2 (3gbps) ones?  Your drives will be SATA-2 as it's hard to get SATA-1 drives these days.
If you're up for it, I'd be really keen to do some throughput comparisons with you - your SAN's CPU is faster than mine, but I'm going to guess that the SATA controllers are SATA-1 (older motherboard) and my one's SATA-1 so the throughput of the controllers should even the playingfield.  The comparison's would end up being OF's RAID vs Freenas' RAID.   (My LAN is only 100mbps - haven't sprung for gigabit switches as yet...)
Anyway, post back if you're keen and I'll track down one of those free apps that the reviewers use when testing HD's etc.

nzsouthernman's profile

New Zealand

This blog is mainly going to be for writing down things when I work them out so when I have to try and do it again I don't have to think too hard.  And also to comment on stuff.  Hopefully not too much rant /rant involved.

My latest finished and successful home project;

QNAS NAS/SAN Appliance
8x 750GB 2.5" SATA in R6 array, running PLEX and providing additional storage for MythTV

Toys in the attic;
iPhone 7+ (2D)
MythTV separated backend with 2 DVB-S encoders & 2TB disk space & two frontends

Follow me on twitter;