Sunday 15 September 2019

Creating My Own NAS - Part 2:Getting the right motherboard

In part one of this series, I discussed the reasons behind wanting to use FreeNAS as the basis for a DIY NAS solution in my home office/lab.

I finished up the last article by saying I would concentrate on the motherboard component of this project next as I felt that this would probably be the trickiest part of the build.

The specs for the overall system are not mind blowing, they dont need to be as I am not going to be using this as a critical server and I dont need it to be particularly powerful when it comes to the level of compute that I would like it to do. Also, I am trying to keep the costs down here whilst at the same time provide a flexible and dynamic base for the hardware itself.

Going into this build, I already knew I would want a motherboard that would be comfortable in the server role as well as being able to get all of the features associated with server activities built in. My current NAS is supposed to respond to WOL magic packets, but this functionality is shaky at the best of times, I know it works well on the majority of servers I have used in the past so it kind of makes sense that the feature should be more dependable on a motherboard designed for this purpose.

I also wanted to have the ability to have more than one actual CPU, a dual processor based system would again give me more flexibility when it came to the level of compute this thing has once it is up and running.

So, after scouring eBay for a suitable solution, I came across the Gigabyte 8IPXDR. This cost less than £40, so I consider this a pretty good catch for what I intend to do with it and should have the extensibility I need for the build. It is also a server motherboard in the ATX form factor that even came with a back plate, which will be immensely useful for keeping out all the dust and for keeping things quite. The only bad thing I can think of right now is that this is an ATX-E motherboard, the listing didnt mention this fact, and I only have an ATX case. On looking at the case, its pretty huge, so might accommodate this board, I dont know yet as I haven't gutted the case to see if things will fit.

This is also a dual CPU motherboard, so it meets the criteria for providing more flexibility when it comes to the processing power. One other fact that was missed off the listing is that it has two Xeon CPU's sat in both sockets - this is a bargain, although I am not sure what CPU's they are exactly. From Googling the numbers on the CPU's themselves, they may be 6-cored running at 2.5Ghz each. If this is the case, then I have grabbed a bargain indeed.

Sadly though, it doesnt have any on-board SATA interfaces, so I will need to obtain a SATA controller specifically for these drives. Fortunately, FreeNAS is compatible with a large number of SATA controllers out of the box and I have already begun looking for one that will work with this board.

This brings us on to the connections the board has itself. Because of the time it was made, it doesnt have PCI-E slots on board as standard, which is a bit of a shame but nothing that will effect the performance of the system when it is built. Instead, it comes with a mixture of PCI-X and PCI slots, which I think was the practice at the time. This means that the SATA controller I will get can be of the PCI-X format, and can also be a 64bit card - the board has one slot for a 64 bit card.

It also support SCSI RAID, although I dont think I have any compatible drives for this, unless one of the many drives I have in an old SAS array (that doesnt work) is compatible - it isnt important for this build right now as I am trying to make use of my SATA drives. There is also a pair of IDE connectors and an interface for a floppy, I have some old IDE drives that can go in this at some point and who else feels like a computer isnt a computer without a floppy drive?

It has two built in gigabit Ethernet ports, which is great as I will make use of them and on board ATI graphics, so the display should be pretty good as well.

So, what is happening next? Well, I will need to get that SATA controller card for definite, without it the build stops in its tracks. I am going to try and source a 64 bit PCI-X example of one, mainly because I have not used this standard before and I am curious. Also I will need to get some memory for the board, it can support upto  12GB of installed ram - but it needs to be ECC DDR 266Mhz memory. There are six slots available, however I very much doubt I will ever need to go that high for this build, 4GB should be plenty for our needs. Getting a pair of coolers for this board is also on the cards, whilst it came with free CPU's my luck didnt run as far as free coolers and I also need to check that the PSU in the case I will try to fit this to is compatible with this board.

And then there is fitting the board into the case itself, if that doesnt happen then I am going to need to get an ATX-E compatible one, and I am hoping this doesnt happen...

So, the next part should cover the SATA controller once I have bought it and an update on how it went fitting the board into the case.

Wednesday 11 September 2019

Creating My Own NAS - Part 1: FreeNAS

For the last five or so years, I have been happily using a Synology DS215J NAS on my network to handle all of my off machine storage.

I love this device, it can accommodate two SATA drives in a number of RAID configurations to ensure that your data is securely stored. Right now, I use mine to archive important files as well as to act as a media server.

Synology provides an OS environment on the device itself that is highly configurable and one that has an active ecosystem of first and third party plugins to further extend the capability of the device itself. For instance, you can quite happily use this device as a full blown webserver, running PHP and POSTGres or as a CRM portal using Sugar, the choice is extraordinarily large.

For my needs, I make use of the media server plugins, this serves up all of my music and video across my network and any other device that can connect externally. I also have a cloud storage plugin that allows the device to connect to my various cloud storage solutions, OneDrive, Google etc, and sync files between these locations to ensure that I never lose my important data.

However, I have found myself in the position where I would like to upgrade my current solution in order to add more disks - I can have a max of two, and to increase the performance of the media capabilities - the CPU and resources on the box often get maxed if there is a lot of trans-coding.

I would have liked to buy a more capable version from Synology, but these things start getting expensive when you want to have more expansion options for disks and I just cannot justify spending that amount of money out for a device like this when I have other things I could spend the money on.

After doing a bit of investigation into other products I learned of something called FreeNAS. This is an open source storage OS specifically designed for, well, storage. It is intended to provide a complete and fully featured OS that supports NAS operations. All you need to bring to the party is your own hardware and you are up and running. This is an important point to note - in many consumer NAS solutions, you mainly get a rather under powered desktop PC that has been adapted for use as a NAS, for example the CPU in my DS215J is a Marvell Armada 375 Dual Core running at 800 MHz, it also has just 512MB of RAM. This is pretty weedy, even by the standards of five years ago.

The comparable model available now is the DS218+, which is a significant upgrade on my model and comes with a dual core Celeron running at 2.5Ghz and 2GB of RAM, a massive increase compared to what I have now - but this still has the same physical limitations as my current model with almost no ability to upgrade the memory or connectivity.

Now, FreeNAS allows you to install the OS on pretty much any hardware that is supported - you could run this on an old desktop PC that has IDE drives if you wanted to and it would work as a NAS, albeit a slow one by today's standards - but the upshot is that you get the sensibility that comes with a PC.

Like pretty much any guy of my age, I happen to have an old PC lying around - it serves as a stand for a lamp at the moment. I haven't used it in years, as far as I can remember it has an AMD Athlon CPU in it and what was a very capable graphics card from the mid-2000s. However, I dont plan to use any of that gubbins, I am interested in the case, its all aluminium and black (no windows, not that tacky) and takes a full sized ATX board. So I plan to gut this and source a second hand server motherboard to act as the basis for a new NAS build, one that should be able to take full advantage of the technical features available to FreeNAS as an OS.

FreeNAS itself is an OS based on FreeBSD, which doesn't need that much explanation for the purposes of this article. It also offers a number of features you would find on any enterprise level storage OS component, such as full disk encryption, RAID and backup that is compatible with many different providers. Additionally, it is based on the ZFS file system, which means it can handle snapshots and replication - again these are things you would find in any serious enterprise storage solution, but are neatly delivered to the hobbyist here.

As a result of this, it is possible for someone to create a custom NAS on their network at home that can handle all of the file-sharing, media serving, backup and replication that might be needed to keep an entire families worth of devices running hassle free. Not only that, but due to the fact you can install this on off the shelf hardware, the extensibility of the solution is only limited by your own finances and imagination. My current NAS has one gigabit LAN connection, but the new one I am about to build, why not throw in two 10GBE connections that are teamed? Probably wont do that though, lol.

So, for this little project I pretty much have everything I need to get started. I have a case and all the optical drives/floppy drives I need. I might need a new PSU, but I am going to get the following:

1 x server motherboard: This will be a second hand one from eBay. Nothing too old, but nothing too expensive either. This is my first time doing one of these builds, so I will refrain from going full on and getting a stupidly fast system, given that I dont need one so powerful.
1 x SATA controller: depending on the motherboard I get, I might need to obtain a SATA controller. This could be the case if the motherboard I get is not young enough to have this on board, right now I am assuming that whatever I get will support SCSI under RAID - but I dont have any SCSI drives (but I do have a stack of SAS drives...) plus SATA is a better choice for future drive upgrades. I may also want to have an NVME solution in here as well to boot from, this is something I will need to consider.
2 x CPU's: I am getting a server motherboard, so why not try getting a dual socket one? I was a teenager in the 90's, so I can remember the dream of owning a dual CPU PC for gaming back in the day, I know I dont need two CPU's these days but doubling up the chip count will also double my core count. This seems like an economical way of getting as much performance out of the setup as I can.
RAM: I have some RAM now, but I dont know if it is going to be suitable for this build, so depending on the motherboard I get, I made need more. But right now, I think I have 4GB of RAM that might be suitable for this.
HDD's: I have a stack of SATA drives I can throw in this baby from the get go. Most of them are 500GB drives, which will be fine for testing and getting the set up correct. I also have one 1TB drive I can throw in as well, but it will all depend on how the build will go and what sort of SATA controller I will end up getting, i at all.
1 x PSU: I have an ATX PSU right now, but I have no idea if this will be suitable for the build, so probably I will need to get another.

The first component I will source is the motherboard, this will pretty much determine the overall specification of the device and how much money I will need to spend on other components for this project. I want to keep the price as low as I possible can, naturally, so it will be scouring eBay for me until I find something suitable.

Part 2 should follow this one pretty quickly and will focus on the motherboard search.