Build a home server - part 1
Preface
So, you are in the need of a new server? This blogg will not help you with choosing the right hardware but propose to you a perfectly viable solution for a SOHO-server. The concept is not constricted to the small wallet but is expandable to your needs and choice.
When I embarked this journey I only had a few things in mind that I wanted to accomplish:
- Buy me a new, more silent home server.
- Install an Active Directory 2008 R2.
- Install a file server (Linux) that presents a shared resources with NFSv4 and CIFS using AD as the authentication source.
Instead of just these three quite simple goals this evolved beyond my imagination. I soon realised that I have to configure a virtualization host, learn more about the inner workings of Linux, software RAID, LVM and so on... Great fun though!
I did also realize that this configuration is a perfect server solution for the small business. If you are about to deploy a new server for your business or even looking for a solution to productify and support, this might be just what you are looking for. One thing, if you are using this, private or in business, please post a "I used this!" and with a few words tell us your plans here. I would appreciate it. A lot.
And a special thank you to all of you open source wizards that have taken time to program, realize and make all the great software publically available. I am mighty impressed of your work! Thank you.
Being a leacher for years it is now time for me to contribute to the common. I hope you find this blogg useful. This recepie is a compilation from various resources on the Internet.
Hardware
I am not amused with choosing hardware. I find it quite boring, so imagine my surprise when I realized that this part actually was fun. This was also the first time I ever built myself a computer. I searched the Internet for advice on choosing hardware and found Thomas Jansson's blogg. I ripped his setup but chose a cheaper motherboard because the one I wanted was out of stock and a less powerful CPU but more RAM. In retrospective I would follow his advice and buy a new, more silent CPU fan. If you are building a server for a small office, consider a chassi that has room for hot swapping hard drives.
My setup:
Hard disk: | SEAGATE BARRACUDA GREEN 2TB 5900RPM SATA/600 64MB | x4 | ||||
Chassis: | LIAN LI PC-Q08B BLACK ALU MINI-ITX NO PSU | |||||
Memory: | KINGSTON DDR3 HYPERX 8GB 1600MHZ CL9 (2X4GB) | |||||
CPU: | INTEL CORE I5 2400 3.10GHZ 6MB S-1155 | |||||
PSU: | COOLER MASTER SILENT PRO M ATX12V 2.3 500W | |||||
Motherboard: | ASUS P8H61-I B3 H61 S-1155 MINI-ITX | |||||
SATA card: | Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller | |||||
SSD: |
60 GB |
x2 |
One of the 2 TB disks and one of the SSD disks are attached to the SATA card.
Software
There were certain techniques I wanted to learn more about; software RAID, LVM and DRBD. During my searches I also found Facebook/Flashcahe and later on I found Arno Tölls et al version for Debian. I already had a 60 GB SSD disk in my laptop which I immediately janked out. More thinking rendered buying one more, so that I could create a mirrored root and Flashcache. By now you understand that the choice of operating system was Linux and the Ubuntu distribution version 12.04.
More ideas, more software
I am a Windows Systems Administrator by trade and Active Directory is my primary experties. One goal with this server is to install and configure an Active Directory and a Linux file server presenting resources with Samba and NFSv4 using Kerberos for authentication. That is the reason for the amount of RAM - virtualization with KVM.
Part 2 - the first take. Installation
The new approach
I failed with my first try. It is a pity.
Back to the drawing board. In the new approach I am going to use FreeBSD and Oracle ZFS (the open sourced).
But first things first. I wanted to use Ubuntu as the hosts OS and ZFS. How to combine? First I found ZFS-fuse. But never really liked it. Don't ask why. I don't know. Later I found ZFS on Linux, which I found more, how should I put it, tasteful. I downloaded it, compiled it and tried it. Worked fine. Great stuff! But I do not want to compile and remember all the details. What now? Gladly I found a PPA for ZFS. But the combination, Ubuntu and ZFS, did not work as good as I wanted and expected. Again, don't ask. It just did not appeal. Later, on several forums and blogposts, I found that FreeBSD had incorporated the latest version of ZFS in their version 9.0 and other blogposts described, more or less detailed, how to make a mirrored ZFS-root. FreeBSD started to grow on me and I tested it out. Conclusion? Great Stuff!
With the original design I wanted to run the file server as a virtual guest. That was also my approach when I started to look at FreeBSD. Later on I found out about Jails. A facility where you can contain a server, say a file server, without compromising the host. With using Jails I am hoping that I can exploit all the good stuff that ZFS offers (znapshots, zfs send/receive...) within the jailed server. It would be really great if I could present what Microsoft calls Previous version to the client. No matter if the client runs Linux or Windows.
So the new approach is FreeBSD and ZFS.
Part 2 - second take. Installation.