Server hardware prep

From SaruWiki
Revision as of 22:25, 12 March 2012 by Saruman! (talk | contribs) (hardware section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

When building a small server, the first line of business is getting the hardware right. And you must get it right, because hardware forms the foundations of your server. If the foundations are shoddy, then so will your server be.

Getting the hardware

Note: in the following we're assuming you'll be assembling an x86 or x64 type of machine, as it has about the best price/performance ratio you could wish. Hardware costs for other platforms, e.g. IBM's Series p or HP 9000, can be much higher, while platforms like ARM are energy efficient, but just not very powerful. Also, the availability of components and of help can be less than with the ubiquitous x86/x64 platforms.

Naturally, before we can begin to install the operating system, we need to obtain the necessary hardware. Which hardware you require depends on what you want the server for; a test server on which you will test only a single feature for a short while does not need the same quality of hardware as does a server that's supposed to act as a home server for many tasks for a long time. We'll assume your server will be like ours: a home server that must perform many tasks with sufficient performance for a few users, that's reliable and will last for a couple of years. So build or obtain a server with at least the following hardware:

  • a spacious casing with big, quiet cooling fans, like the one we have;
  • an efficient, heavy-duty power supply that's rated high enough for your devices, and has a decent efficiency. For example, a Corsair HX520 power supply;
  • a server class motherboard, e.g. an Intel or AMD based motherboard. DO NOT go for the cheapest motherboard you can find: if you pay peanuts, that's what you'll get. Server class motherboards have the quality, stability and durability you'll need from it, and usually also most of the needed peripherals, like multiple ethernet network cards on-board. Usually a Linux server does not require much in the way of video performance (and the screen will be used rarely, if ever), so any old integrated graphics will do.
  • a matching CPU - or multiple, if you think you need the power and the selected motherboard has the sockets. Furthermore, it pays to think about the energy use of your server CPU. For instance, you could choose an AMD Athlon X2 5600+, running at 2,8 Ghz and 89W maximum, but you can also go for an AMD Athlon X2 4850E, which is dualcore at 2,5GHz, but uses only 45W maximum - almost half of the former! And over a one year period, this choice can save up to 385 kWH. With electricity costing close to €0,25 per kWH (at least for some of us), that could save you €96,- a year (assuming your CPU is running at top speed all the time - which it won't). All I'm saying is: think about power use.
  • a CD-ROM- or DVD-player - although you might not need it any more after installation. Thus, you may opt to use an external USB DVD-player, if your system allows for booting from it.
  • multiple hard disks - you'll want redundancy, because every hard disk fails at some time. The drive with your data on it will fail fatally when it is most inconvenient to you, and any data on it that you consider valuable will likely be lost forever. To make Murphy's work somewhat harder for him, we're going to store our data redundantly, so that if any drive in the server fails, we'll not lose our data or our server. Thus, get yourself at least two hard disks for your operating system, at least 40GiB in size (don't think you'll be able to buy smaller ones nowadays), and spanking new (NEVER use old hard disks for your production server, new ones are just too cheap to run that risk!). You may also consider using 2.5" "notebook" hard disks, since they also consume less power than do 3.5" hard disks. However, you should investigate before buying SSDs for your Linux server, as there are some caveats there. We're not going into that subject here.
  • (multipe) network card(s) (NICs) if your motherboard does not have enough NICs integrated on-board. You'll want a NIC for your network, and another one for your Internet connection; and possible a third one for the wireless segment of your network.

Now build a machine out of the above, or have someone build it for you.

Preparation of the hardware

(Note: in the following we're again assuming you're running an x86/x64 type of machine. Hardware requirements and preparation for other platforms, e.g. IBM's Series p or HP 9000, can differ significantly)

Next, check the assembled hardware:

  • is the configuration complete? If it does not have a CD/DVDplayer from which it can boot, then installing the software gets more difficult - at least get an USB external DVDdrive or something like that.
  • are all components connected properly (memory modules seated correctly in their sockets, AGP card inserted correctly into the AGP slot, et cetera) and are all cable connections made (multiple power cables to the motherboard, one power cable plus one data cable to each hard disk, etcetera)?

Following this, you may hook up the machine. It's going to need power, and you will need at least a keyboard and a monitor attached. And if you want to use a Graphic User Interface to install, a mouse is required also. When you've ensured that everything is safe, you can turn on the machine, and continue to check it:

  • do all fans start to run when you turn on the machine? (if not, then quickly turn off your machine and correct the problem!)
  • does/do the hard disk(s) spin up?
  • do the power button and reset button operate correctly?
  • are the power led, HDD led and other display gadgetry functional?
  • when you let the machine power up, does it emit a single beep? And does it then show a Power-On Self Test screen (POST)?
  • Does it show the correct amount of memory in the POST screen? The correct number & speed of the CPU(s)?
  • Does the machine recognise all controller cards (SCSI, S-ATA etc)? And all attached DVD-drives and hard disks?
  • are all BIOSes/firmwares up to date?
  • If you have a hardware RAID controller, are your RAID arrays built already?
  • does the machine attempt to boot from at least the hard disk?

...et cetera. If there is any problem, or you want to update the BIOS or firmwares, it's best to do it before the operating system is installed. This Wiki, however, is not the place to get the information on how to accomplish these type of tasks.

The last steps in the preparation of the hardware, are

  • to ensure that the machine can boot from CD/DVD, so that you can start installing Debian from it. It is possible to install Debian over the network, but that requires setting up a PXE Boot server which is (currently) outside the scope of this wiki.
  • to connect the hardware to the Internet, so that it can get all required updates etcetera; please do not connect the box straight to the Internet, but make sure that it's safely behind a firewall, or failing that, a NAT router.

By now the system should be almost ready to receive it's Operating System. But first we have an issue to tackle: that of redundancy.

Software or hardware RAID

Your hard disks will fail. They absolutely will. It is never a question of "if", only of "when". So what will you do when the hard disk containing your complete operating system fails (besides pulling your hair out, that is)? What we propose is this: hard disks are pretty cheap nowadays, so let's use RAID technology to make our hard drive space resilient against failure of a whole drive. So first make sure that you have two disks of equal size instead of only one. Had you already been planning to use multiple disks already, then make sure you have at least one disk more than your space requirements prescribe; the space on that extra drive will provide the needed redundancy. Next, click here to learn a bit more about RAID, to make the decision to use hardware-based and/or software-based RAID, and to plan your RAID arrays. In this example, we'll assume you're using hardware RAID on a RAID controller that's supported by the Debian installation software. This means that the installation software will "see" your RAID array(s) and present them as usable drives.