xgrr.de – the whole not the half

things, thoughts and stuff out of life, daily business and computer science


Areca RAID Discovery in Linux

Short version: Pain in the ass in the beginning. Long version. Areca provides a HTTP proxy and a CLI interface to the the controllers. Unfortunately the Kernel driver which comes with the vanilla Kernel from kernel.org does not include the necessary functions to allow the newest versions of these nice tools to access the controller directly, which is kind of stupid.

However. As my RAID was migrating and I wanted to have the progress (takes some time with 5TB) accessible nicely remote on my browser I searched the Areca FAQ section (which is really good btw) and found an entry which describes the problem and also provides a solution

Only the version 1.71 of the HTTP interface is capable of connecting to the driver provided by the vanilla Kernel. I actually don’t know if they changed something in the driver in the meantime.

You can find the right version of the HTTP interface on the Durch Areca mirror.

Partitions > 2TB with Linux

It took me a while to figure out how to get my new RAID featuring 5x 1TB WD10EADS working as one unified ext4. The problem lies in the partition table. After trying and testing (for which I have absolutely no time as I’m currently writing on my thesis) I found a good reference how to solve this problem.

The standard partition label (or partition table type) “msdos” does not support more than 2TB partitions. The solution is to use the EFI GPT partition table. With Debian the support for this partition needs to be enabled in the Kernel specificly otherwise (which just happend to me after copying ~ 800GB) the partition is not readable or of limited size after reboot.

If you struggle with large disk and partitions check out this straight forward howto on creating the right partition labels and activating support for them in the Kernel.

Debian and the secure keys

Without comment:

Debian: You Can Never Be Sure

Debian: Guaranteed Entropy

Spamassassin 3.2.2 auf Debian

Vorletzte Woche musste ich meinen Mailserver neu aufsetzen, da ich auf einen neuen Server umgezogen bin. Dabei habe ich den Spamassassin diesmal nicht aus dem apt von Debian installiert sondern einfach über die CPAN Shell. Dabei kompiliert sich das ganze automatisch. Leider bekommt man dann keine Start-Stop-Scripte, wie man sie von Debian gewöhnt sind. Macht nix dachte ich mir. Lass ich den Spamassassin einfach unter daemontools laufen die eh meinen qmail antreiben.

War eine gute Entscheidung. Performance und Stabilität haben meines erachtens zugenommen. Bis jetzt noch keine Probleme mit gehabt. Ein bisschen getunt habe ich auch noch. Einige Rules für den Spamassassin lassen sich compilieren über ein bistimmtes Plugin – das macht die ganze Sache natürlich noch schneller.

A (new) Spam technique?!

When I couldn’t sleep last night I had to think about my new mailserver installation and the load of measurements I’ve undertaken to prevent my customers getting spam or to allow anybody to relay spam through my server. Then I realized that there might be the chance of a new method how good spam-filter techniques could be used as a spam drone.

Get the situation: I’m John the bad spammer and want to deliver my mails to a lot of boxes around the world. I connect to a mailserver and deliver all my mails with a faked envelope. The to address has to contain an mailinglist or something like that which bounces emails for people who are not listed and the return address should be the person where the spam has to go. The mailserver (when configured to comply with RFC) should send the bounce directly to the person who should recieve the spam. This is only working if the spamfilter like spamassassin doesn’t act after the SMTP dialog has finished.

I didn’t try it but it could be exploited at some point. Due to the fact that there are many hosts who doesn’t send bounces anymore (in Germany some of the government servers has bounces off) or has the spamfilter integrated in the smtp dialog which scans the mail while delivering it shouldn’t be a big problem. But it could…

Making Apach2 even faster

When I built my new webserver I had to decide if I gonna use lighttpd or apache2. I wanted to use lighttpd because in fact it is faster than apache2. But then I discovered that it doesn’t support .htaccess files heavily used by my customers. So I had to throw away my flowery plans and use apache2 again. (Not that I’m really sad about it – the configuration was easy beacause I’m using it since… a long time ago :) )

But I figured there has to be something to make the apache2 faster that it is out-of-the-box on a Debian Etch system. I wanted to use mod_fastcgi to link PHP and use mpm-worker for apache2 but due to a lack of time I failed. Later I discovered it was only a matter of permission which prevented this. Due to mod-php5 I couldn’t use mpm-worker but had to use mpm-prefork the slower variant.

With this in mind I thought “lets check the apache2 docs and check if there is something we can do about this”. So I discovered the following directives which can fasten up things a little bit:

BufferedLogs On
EnableSendfile On
HostnameLookups Off

BufferedLogs is an experimental directive which prevents Apache2 to write logs directly to the disk but keeps them in memory and write them in a bunch. This should minimize the write overhead for each access so the access itself is faster.
With EnableSendfile you tell apache2 to use the sendfile method from the Kernel for static files which should prevent apache2 to read the file itself so reducing the readoverhead for static content.
HostnameLookups is off by default on Debian Etch. I don’t know how it is on other distributions. The command prevents apache2 to make an lookup for the ip from the visitor. When your nameserver is slow or no hostname can be resolved this could slow your system down incredibly. (In my expirience 70% all the problems with databases or webserver are DNS problems).

Tuning up VMware Server on Linux

When I finished my VMware Server 1.0.4 installation on Debian Etch with a 2.6.22.9 Kernel and moved all customers to the new server I was very disappointed. The overall performance was very poor on a dual Opetorn system with 2 GB memory and I had no explanation for it. After a little testing I figured that I gave all the available memory to use for the VMs and left almost nothing over for the server itself. When I pushed about 100 MB of memory free for the server itself the performace improved a lot.

But after all. A VMware Server with six running VMs doesn’t fit into 2 GB of memory. Start with three, be certain with four GB of main memory.