Archive for November, 2009


Building Your Own Server

November 12, 2009

When it comes to building a server, many people hesitate. When building a server, there are a lot of choices to make, and equipment is more expensive than equipment for a PC, but the results can be very satisfying.

If you’re considering building your own server, you shouldn’t do it because you intend to save a lot of money – you probably won’t. You often cannot build a PC for less than you’d expect to spend on a major first-tier OEM, such as for a Dell or HP. Components are a commodity, and OEMs buy them by the container load. Best you can hope for is to approach their pricing with your costs. Servers, on the other hand, tend to have higher markups. So it is possible to save some money building your own server. But, again, saving money is not the best reason to build your own server.

The best reason for building your own server is that you can select your own components in a way that buying someone else’s system doesn’t allow for. When you build your own server, you have more control over the setup of the system, and you’re more likely to know what to do or replace when things go wrong. A home-built server is generally rather flexible to configure because you use industry-standard parts and not some proprietary type of casing, memory, or motherboard that will block your upgrade path in the future. Building your own server often results in equipment that has a longer duty cycle because it’s more upgradable.

Building your own server makes sense for another reason: Although system builders make their servers competitvely priced at purchase time, everything else they sell you – from service to upgrade parts and even their shipping – is priced at whatever the market will bear.

Server Purposes and Form Factors

If you have decided to build a server, the first place to start is to determining the intended purpose of the server. That purpose should guide many of your selections. A good rule of thumb when building any system is to try to build a balanced system but oversize that system for any task that is the primary function of the server. A balanced system is one where each subsystem of the server is powerful enough to allow you to avoid bottlenecks. If the purpose of the server is to serve files, then the I/O subsystem needs to be emphasized.

Regarding a balanced system – It’s impossible, or at least too costly, to size subsystems so they never present a bottleneck. When a system gets a job that requires a lot of processing, chances are that the CPU is going to be 100% utilized until the job is near completion. The goal is to allow acceptable performance in those circumstances as well as to maintain a good average CPU utilization rate. That’s one advantage servers offer. If you find that your CPU utilization goes up, if you’ve selected the right motherboard, you can upgrade your processor or add another processor. What typically separates a server from either a workstation or PC is that servers are built with more upgrade options.

Realistically, there are only a few different types of servers that are practical for most people to build themselves:

A basic server, which is really a souped-up PC.
A workgroup server, featuring dual or four-way CPU boards.
An SMB or “Small or Medium Business” server, which is typically a dual-processor system but built with a lower-performing I/O system.

It’s possible to build a thin form factor system using readily available components for rack-mounted units. Two types of servers are difficult to build, given the current retail model:

SMP systems with more than four processors on the motherboard.
Blade systems.

Neither of these two types of system is standardized enough and in great enough demand from the average system builder that companies stock the parts needed to build them. If you intend to build either a large SMP or blade system, you will find yourself spending time talking to the original parts manufacturers themselves. Chances are that for a single board or limited number of boards, they aren’t going to be much help to you.

Server Components

A server should include the following:

Two- or four-way SMP support – It’s a good idea to have at least a two-CPU system, even if you choose to populate just one of the sockets. Having additional CPU sockets allows your system to grow over time.

A high-performance server chipset – The motherboard chipset is of central importance to the overall performance of your system.

Large memory capacity and I/O bandwidth – The amount of memory determines the number of clients you can support, as does your I/O bus.

High-performance network interfaces – Without a strong network interface, you create an unnecessary bottleneck getting data in and out of your server.

Management features – Because a server is supposed to be up and running reliably, it’s important to be able to view what’s happening on the system and make changes both locally and remotely.

A server operating system – You don’t want to limit the number of connections or any other properties of your system because you’ve used a desktop- or workstation-oriented operating system. Your equipment should be selected with the operating system in mind.

The above list represents a checklist for selecting your basic server components. They’re necessary to create a server, but aren’t probably sufficient for most purposes. Servers are differentiated from workstations or desktops through the addition of these features:

Redundant components that allow for graceful failover – Redundant components used are power supplies, fans, and hard drives.

Hot-swappable components – The most important hot-swappable components are disks, but it’s valuable to be able to swap out other components.

High-performance and high-capacity storage – The purpose of your server determines the amount of storage (and memory) that you need.

Intelligent RAID arrays that allow for advanced volume management – RAID arrays make so many important volume operations possible that they are really a requirement for most servers these days.

All these requirements speak to the fundamental differences between workstations/desktops and servers. Servers must be much more dependable, must be higher performing, and must be flexible and have room to grow. Servers require a significantly higher investment than standard PCs, so you want to maximize your investment in them by selecting components that support the features described in the above section.

Assembling a Server

After you’ve selected your components, the next step is to assemble the system. In most respects, there isn’t much difference between assembling a server and assembling a PC. There are, however, a few critical differences, so in the section below, I discuss the construction of a hypothetical server, step-by-step.

Installing Core Components

First, let’s take a walk through the casing assembly, assuming you bought a case with no pre-assembled components already installed. Begin as following:

1. On a good work surface with adequate lighting, open the case and remove any included screws, mounting brackets, disk cages, and other components that you will be populating with parts.

2. Take a good look at your case to familarize yourself with the design and determine some fundamental issues, such as power supply placement, and number of fans needed and what type.

3. Install the power supply, and don’t skimp on it. Your power supply should be sufficient to run all your components well below the stated operating limit and should have good thermal properties as well as run quietly. You can pay a lot for a server power supply, but it’s money well spent.

4. Install all the fans. The goal of cooling your system should be to create airflow through the case so that it dissipates heat. A lot of system builders position their fans so that intake is from the front of the case, and exhaust is out the back. Some units, such as drive cages, may require their own fans.

5. Install the motherboard as well as any backplane your system may have.

6. Install your CPU and then attach your cooler or heat sink and plug it into your motherboard’s CPU connector. Be sure to either use an ESD wrist strap to prevent electrostatic discharge or ground yourself properly.

7. Attach your case’s front panel connections (power, power LED, restart, HD LED and speaker) to the motherboard’s connectors. Visually inspect the connections up close to verify they’re on the correct posts and the polarities are correct.

8. Insert one stick of RAM into your system, on the slot closest to the CPU.

9. If your motherboard doesn’t have a video chipset built in, install your video card into the appropriate slot: AGP, PCI-x, etc.

10. Attach a keyboard, video monitor and mouse or attach the appropriate leads to your KVM switch.

11. Boot up your system, verify it proceeds to the BIOS, and stops at the point it can’t find a boot device.

It’s a good idea to test the basic system at step 11, because it becomes increasingly difficult to diagnose problems later on, when there are more potential causes. At this point, if there are issues, you can swap the memory, change RAM slots, swapping the CPU or video board, changing the power supply, and checking your connections. In your initial boot to the BIOS, you can determine whether your power LED is functioning, whether your restart button works, and whether you’re getting beep sounds.

Installing the Remaining Components

After you’ve installed the core components, you can add your peripheral  devices. It’s a good general rule to add 2-3 devices at a time and then test the boot process to ensure the additions aren’t causing problems.  Below are some steps you need to follow, but the order isn’t as important as the previous list:

1. Add the remaining memory. Be sure to test your system again once all modules are installed to check for any potential problems.

2. (Optional) Install your floppy drive. Be sure the red wire in the connection is closest to the floppy power connector (not all floppy drives have this requirement).

3. Install any optical drives and connect the ATA/IDE, SATA or USB connection, the audio connection and the power connection to it.

4. In you’re installing a USB flash storage reader or any other USB storage device, install it, but do not connect it to your USB bus. The reason you don’t want to do this is to avoid your operating system from grabbing a set of drive labels for these devices until you’re done assigning devices to your more common drives.

5. Install any PCI, PCI-x or PCI-Express boards into their correct slots and connect any supported devices (such as hard drives) to those boards.

6. Test your system to make sure all devices are recognized and renumerated by the BIOS.

At this point, your server is fully populated and ready for configuration. If you’re using hardware RAID, you’ll need to follow the steps below:

1. During the boot process, go into the RAID BIOS and create the RAID container.

2. Add all the drives you intend to use in your array and designate any additional drives that you want to keep as spares.

3. After you create the container, use the RAID BIOS to create the hardware RAID type: RAID 5, RAID 1+0 and so on.

The process of creating the container is fast, but striping a large array can take some time.

Installing an Operating System

After your RAID has been configured, it’s time to install your operating system and complete the installation. To install your operating system, follow the steps below:

1. Insert the O/S install disc into your optical drive and start your system.

2. As your system proceeds past the BIOS and into the installation routine, make sure to correctly specify what your boot device will be and that you have the correct driver in hand to install so that your operating system will recognize the device.

In many instances, an operating system may come with the correct driver, but whenever possible, you should try to install the very latest driver from the vendor’s Website. If you are installing a RAID system, try to have that driver on hand for your operating system.

3. As part of the installation routine, specify the boot partition and the type of drive formatting you wish to have on it. With Windows Server, you probably want NTFS; with Linux or Unix, you may need to specify not only the partition and its type but also the number and definitions of any slices on the drive. Formatting a large volume takes some time, so this is a good time to attend to other tasks.

4. Proceed through the installation, specifying the details of your network connections as well as the particular system components that you want to install.

5. When your operating system is installed, shut down the system and connect your USB connections for any USB drives.

In building a server, the steps people seems to have trouble with are creating the RAID container and not having the correct device driver in hand. Many RAID boards are poorly documented, and if you haven’t done a system build before, you might not realize that you need to create a container first and stripe it prior to installing the operating system and then formatting the volume. The container and its striping are a hardware feature, separate from the formatting the operating system does.

With your server now up and running, it’s good practice to let it burn for 48 hours, monitoring your system temperature, which can be done using capabilities built into modern motherboards. In particular, you should monitor your CPU temperature to verify it’s not overheating.


Command Line Backup & Restore Using reg.exe

November 11, 2009

A command line registry manipulation tool called reg.exe is included with Windows XP. This tool is useful for selectively backing up or restoring specific Registry subkeys. Numerous functions are available in reg.exe, including Registry exporting and importing.

To backup a Registry key using reg.exe, use the following syntax:

reg export rootkey\subkey filename

For rootkey, you can use the abbreviations HKLM, HKCU, HKCR, HKU or HKCC. Subkey must be the full name of a Registry key under the selected root. Filename is the name of the file to which you want to save the exported data.

To restore a Registry key using reg, use the following syntax:

reg import filename

When importing, filename can be any file created by reg export, from the regedit Registry Editor’s Export command, or created manually with a text editor.


Server Categories

November 11, 2009

Entry-Level Servers – An entry-level server is a one- or two-processor system meant to provide a network service or services to as few as one client/user, up to as many as a workgroup. Many entry-level servers are used in horizontally deployed applications.

Midrange Servers – The midrange server offerings are viewed as department-level servers or servers that can provide network services to 10 clients/users, up to 250 clients/users for large applications. For simpler network services, such as DNS, a server of this class might service thousands of users.

Enterprise Servers – An enterprise server is a PC-based server equivalent of a mainframe. Sun’s systems in this area scale to hundreds of processors and are used for applications such as databases that best scale vertically.

Blade Servers – A blade server is a motherboard that’s been modified so it fits into a chassis and is hot-swappable.

Appliances – An appliance server is a special-purpose server that requires little maintenance and/or management.

Carrier-Grade Servers – This line of servers offers NEBS Level 3 (Network Equipment Building System, an industry standard) solutions for the telecommunications industry and for back offices.

Storage Servers – Sun is a major supplier of storage arrays, tape backup systems, and storage software, through its StorEdge line. Sun’s business is mostly to Sun server customers, but it also plays a central role as a management console of choice for Storage Area Networks (SANs).


Wildcards With the DIR Command

November 11, 2009

Visualize having 273 files in one directory. A few of those files have their extension .doc, but most don’t. You’re only looking for files with the .doc extension. Wouldn’t it be nice to type the DIR command so that only the .doc files come up? You can do this using wildcards.

A wildcard is one of two special characters, asterisk (*) and question mark (?), that can be used in place of all or part of a filename, often to enable a command-line command to act on more than one file at a time. Wildcards work with all command-line commands that take filenames. A great example is the DIR command. When you execute a plain DIR command, it finds and displays all the files and folders in the specified directory; however, you can also narrow its search by adding a filename.

If you want to confirm the presence of a particular file in a particular place, this is very convenient. But suppose you want to see all files with the extension .txt. In that case, you use the * wildcard, like this: dir *.txt. A good way to think of the * wildcard is “I don’t care.” Replace the part of the filename that you don’t care about with an asterisk.

Wildcards also substitute for parts of filenames. This DIR command will find every file that starts with the letter a:

C:\>dir a*.*

We’ve used wildcards only with the DIR command, but virtually every command that deals with files will take wildcards.