The new server

I’ve been managing a server for 3 years in a data-park. That time we had a small project that was made in Ruby on Rails (it was a pilot project). Rails deployment wasn’t so easy, however these days there are good solutions with apache and nginx specific passenger module. So we didn’t have any choice, we invested into a machine and took it to a Data park. After the work I stayed alone, and the management of the server stayed on me. Currently it’s hosting five sites with email and domain services.

It’s running Gentoo, the reason is I like specifying those features of a software that I would like to use (I don’t need graphical extension for git with x11-common package on a webserver), and other package managers usually try to find out what I should need (and usually it doesn’t succeed). The drawbacks are compile and install all the necessary packages are very-very slow, and you need to have a gcc or g++, which causes security problems.

As I mentioned, the machine has been working for 3 years, so I decided to change it (although it’s configuration would be enough, but change the whole system without any longtime stop is not so trivial). My new configuration is (thx for Imi @ Balabit!):

  • Intel Core2Quad Q9300 2500 Mhz
  • Intel DG45ID motherboard (it’s a desktop board)
  • 4 x 2Gb Kingmax memory slots
  • 2 x 500Gb Seagate Raid edition disk, ST3500320NS
  • Chieftec BH01BBB400 box

After a lot of tests I decided it would run Debian, but exactly it’s only the base of the system. The system contains lightly separated racks, where each rack has one specified function, but share some common resources with each other. I’m going to write more about the construction of racks, by the way of the introduction they are simple chroot environments managed by Gentoo’s package manager, Portage.

You can ask me why Debian, why not Ubuntu or Gentoo. I’d like to build a thin layer, which handles only the hardware and the basic system tasks. I’d like to create a system in an hour and not in a day. I guess Ubuntu is rather a desktop instead of a server operating system. Ubuntu has the newest packages of a software, but in a server I prefer security to the rapid package building.

So, I chose software raid, I didn’t want to pay a lot of bucks for a hardware raid. I can have problems at blackout, but in a Data park it is very rare.

So my partitions:

  • 150Mb /boot, ext2 (RAID1)
  • 8Gb Swap | /tmp (sda|sdb)
  • 5G / , XFS (RAID1)
  • 453G logical partition with raid1 and lvm

Different partitions on lvm:

  • /usr XFS
  • /var XFS
  • /backup XFS (for local backups)
  • /racks XFS (storage for the racks, it’s comming later)
  • /home XFS (with quota support)

I wasn’t so brave to take the / partition to a logical volume, but I hope 5G will be enough (although we know Bill Gates’ famous phrase about memory consumption)

I’ve installed the following software to the base system (without editors and other non-important stuffs):

  • sshd (remote management with chroot support)
  • mdadm (raid management)
  • smartmontools (monitoring hard disks)
  • syslog-ng (for logging)
  • git (version control for /etc and rack manager software)
  • backup-manager (creating backup from /etc and the racks’ rw partitions (later) with remote upload support)
  • jailkit ( I’ve built a debian package in a buildd debootstrap environment because I found it only in source version, however it’s a very good tool to build and manage chroot environments)
  • python (for jailkit and for my rack manager)
  • aufs (for the rack environment, but I’m thinking about funionfs because aufs is a kernel module while funionfs is running in user-space by fuse. So at a crash only the fuse dies, not the whole system.)
  • squashfs (for creating racks and snapshots)

The rack system will be in the next part…