siyb.de server hardware upgrade - Viva la RAID vol 2

Posted on June 28th, 2008

by siyb

Over a year ago I installed the first harddrive upgrade on Sycorax, the siyb.de server. (Un)fortunately harddrive space doesn’t last forever, so that recent events forced me to upgrade the storage hardware once more. Due to a lack of money I choose to use mdadm to create a software raid above 4 newly purchased harddrives that have been connected to a PCI SATA II controller, anything else would have force me to buy a new motherboard, CPU and RAM.

Ingredients:

  • 1* SATA Controller PROMISE SATA300 TX4
  • 4* SAMSUNG SATAII 750 GB F1

raid2_1

Although I am really happy with my Seagate harddrives that I have used in the first Raid, I have chosen to use Samsung hdds this time because they are quiet, cool and supposedly last for a long time (we will see :>). This report will feature hardware assembly as well as setup of the encrypted software raid.

First of all I had to prepare the server for the new hardware by connecting an additional cable to my Enermax Liberty ELT400AWT and installing an extra fan, to cool the hdds, that would be placed above one another and therefore require some active cooling.

raid2_2
raid2_3

After installing the controller card the hdds could be connected and the machine was ready to be turned on again

raid2_4
bild-008.jpg
raid2_5
raid2_6

Lets build the raid, I found some good tutorials online that helped me setting up the mdadm raid, they can be found in the appendix. I suggest that you take a look at them if you are planning to create a software raid yourself, my notes are just “guidance” and a small reference, but I will not going to explain any little detail. Anyway, here is what I did (Debian Lenny, standard Debian kernel in use):

Installation of required packages:

apt-get install hashalot cryptsetup mdadm

Software raids consist of partitions rather than physical devices, so naturally the first thing to do was to create partitions on the new drives that I could use to assemble a raid, I choose to use cfdisk for comfort, but you might as well consider fdisk or other tools.

cfdisk /dev/sdb
cfdisk /dev/sdc
cfdisk /dev/sdd
cfdisk /dev/sde

I created one partition per drive, which left me with a total number of 4 partitions to use with my raid5.

mdadm –create /dev/md0 –level=5 –raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

Before formatting the raid device /dev/md0, I took some time to encrypt the device:

cryptsetup –verbose –verify-passphrase luksFormat /dev/md0

After that formatting is a piece of cake

cryptsetup luksOpen /dev/md0 cryptraid
mkfs.ext3 /dev/mapper/cryptraid

Adding the following lines to /etc/fstab and /etc/crypttab allows the device to be mounted automatically when starting the computer

In /etc/crypttab:
cryptraid /dev/md0 none luks

In /etc/fstab:
/dev/mapper/cryptraid /mnt/storage ext3 defaults 0 0

The result:

/dev/mapper/storage 2063G 13G 1945G 0.7 [………………………………………………………….] /mnt/storage

tIRC v1.2 release

Posted on April 27th, 2008

by siyb

Eight days after the release of version 1.1, version 1.2 has been completed and may be acquired from our Debian depot or its git repository. The plugin loader as well as the clientsettings option window have been remodeled and plugins are now provided as special formatted tarballs that can be easily installed using the well known plugin installer. Additionally, the IRC away system has been fully implemented now and is therefore ready to be used.

Some nasty and pretty annoying bugs have also been fixed, for instance, all channelflags will be excluded from the nick autocompletion now. For a full list of changes, bugfixes and additions please take a look at the changelog. Windows users will not be able to run this version of tIRC, I simply do not have enough time to modify the code so that it is fully windows compliant.

The platform independence of tIRC defiantly is an important matter, as the client was in fact designed to run on many different platforms, but ever since the introduction of the trayicon and the trayicon flashing mechanism in particular, platform independence was at stake, due to the two completely different approaches of winico, that relies on the windows api and Freedock. The tIRC project is therefore looking for a windows maintainer / packager that is capable of fixing windows related issues within the tIRC code as well as creating full installer packages, for one click installations.

If you are an interested, capable and motivated windows user, that is willing to invest some time and sweat creating a tIRC windows port please let me know. In the meantime, if you are using Windows and want to run tIRC you will have to find a workaround yourself, submit your patch if you did :>.

tIRC 1.1 released

Posted on April 18th, 2008

by siyb
I have just completed all tasks that have been set for tIRC v1.1, some major bugs have been fixed and some additions have been made that will simplify your everyday life on IRC. The most vicious bug that has been fixed was bug #157 that prevented a user to interact with a channel or query, which contained “chokage” characters such as {[]}. Most chatters will be glad to hear that user highlighting and nick tab auto completion are fully implemented now. If you want to know about all changes that happened between tIRC 1.0 and tIRC 1.1, please refer to the changelog. tIRC can be downloaded from our Debian depot or by visiting our git repository at http://git.geekosphere.org/. Please notice that the first release candidate of v1.1 contained some obvious and disturbing bugs that have been fixed with rc2, the Debian package already contains rc2.

tIRC 1.0 Debian Package

Posted on April 12th, 2008

by siyb
tIRC 1.0, that is currently still under development can now be obtained in Debian package form from this website. We plan on setting up a proper Debian depot on geek\o/sphere.org too, so that you can retrieve tIRC by adding our mirror to you sources.list file. For now, please use this link to download the package and install it using:

dpkg -i tirc_10_all.deb

Please be aware, that you will need the following packages in order to accomplish a successful installation: tcl8.5, tk8.5, tcllib, tcltls. If you want to use a modified version of tIRC, you may well do so. The current version in git features a new clp that will allow anyone to create a Debian package from the current source. Please refer to the debian/createdeb shellscript if you wish to know what exactly happens, so that your code gets properly included in the package.

UPDATE: Debian depot on mount.at and tIRC v1.0_Final

mount.at up again aka how to export ejabberd userdatabases from a harddrive connected to a different host

Posted on January 25th, 2008

by siyb

We decided to upgrade the hardware on mount.at today and therefore had to shutdown the server for several hours. Hades is running again now, but not all services are restored to their full extend, the jabber server (jabber.mount.at) has been recovered already and should be usable again. Due to the fact that the bootloader was installed on a hdd that had a total breakdown and I/O errors that prevented a reinstallation of bootloader on the system drive, we had to setup the server again.

The main problem was that our backups of the Mnesia database where outdated, they had to be recovered from the old hdd (the one not broken :>). This procedure turned out to be far more complicated / frustrating than expected. Due to the fact that the control interface ejabberdctl relies on RPC, which require a valid hostname to function properly, the recovery wasn’t as simple as calling the program from the host we connected the old harddrive to. I wrote a small howto for anyone stuck in the same situation:

Solution: chroot

Mounting the harddrive

mkdir /mnt/hdd && mount /dev/sdaX /mnt/hdd

Mounting proc

mount -t proc proc /mnt/hdd/proc/

Change the hostname on the box to the hostname of the machine Mnesia was used on (changing the hostname within the chroot didn’t work), this is necessary because RPC will not work if you do not use the hostname of your old box

$editor /etc/hostname

Chrooting

chroot /mnt/hdd

Starting up the ejabberd daemon and executing backup procedure

/etc/init.d/ejabberd start && ejabberd_ctl backup /tmp/ejabberd.backup

Exit the chroot and copy the backup from /mnt/hdd/tmp/ejabberd.backup to the box you wish to apply it to, use

ejabberd_ctl restore /tmp/ejabberd.backup

to finally restore the backup …

You may need to follow this tutorial when porting the database to a host with a different hostname -> http://www.ejabberd.im/migrate-host

Mount.at will be unavailable for some time tomorrow as well, because the hardware upgrade could not be finished in today’s session, please stand by and sorry for any inconvenience caused.


design: makequick.com | modificashuns and bugfixes by jesse
bottom