Archive for the ‘All articles’ Category.

Getting rid of “IPv6 addrconf: prefix with wrong length 56″

Some hosting companies, notably OVH, have their networking set in a way that it constantly “pollutes” dmesg with the following messages:

IPv6 addrconf: prefix with wrong length 56
IPv6 addrconf: prefix with wrong length 56
IPv6 addrconf: prefix with wrong length 56

Here is what you can do to get rid of it.

Continue reading ‘Getting rid of “IPv6 addrconf: prefix with wrong length 56″’ »

Acer accepting Windows tax refund

Getting a laptop without Windows is really problematic. How about getting a refund for a Windows system you’re not going to use? I tried asking Acer, and it’s no easy task (it’s technically possible, but will cost you more than a refund you get).

Continue reading ‘Acer accepting Windows tax refund’ »

Testing RAM on a server without rebooting to run memtest86+

Sometimes, applications on your server crash in mysterious ways, or your server hangs without any apparent reason. You suspect that the RAM may be broken, so memtest86+would be ideal tool to check RAM – however, there are some problems involved with it:

  • running memtest86+ means server downtime,
  • it may not be possible to run memtest86+ on a remote server without KVM-IP, iLO or similar access.

What to do in such situations? User-space memtester to the rescue!

Continue reading ‘Testing RAM on a server without rebooting to run memtest86+’ »

Building ProFTPD with SFTP support on Debian Lenny

The mod_sftp module implements the SSH2, SFTP and SCP protocols, allowing SCP and SFTP clients to be used with ProFTPD. By default, Debian Lenny does not provide mod_sftp support, but you can build a proper package using a development version available in Debian repositories – here is how.
Continue reading ‘Building ProFTPD with SFTP support on Debian Lenny’ »

Resizing qcow2 images

To date (as of qemu 0.12.5), it was not possible to resize qcow2 images. The only workaround was to convert the image to some other format, resize it, and convert it back to qcow2. Which could be quite lengthy and meant plenty of IO. Moreover, it was even more tricky if the image was already more than 50% of your storage space and you still wanted to increase its size.

It changed with qemu 0.13.0 (still release candidate as of writing this blog post), where resize option was added to qemu-img.
Continue reading ‘Resizing qcow2 images’ »

Useful shell one-liners

A page with useful one-lines for reference.

Continue reading ‘Useful shell one-liners’ »

nginx auth – allowing IP or password-based access

nginx uses similar syntax to that of Apache to allow users to access a directory, depending if their IP or username/pass matches (i.e. you want all users to present a valid username/pass match, but want to let some automated checks coming from specified IPs through, i.e. from ldirectord or nagios). Here is an example.
Continue reading ‘nginx auth – allowing IP or password-based access’ »

Source port routing

Sometimes, you may want some services (i.e. web) to be routed through a different interface. Here is a quick setup with some common problems.
Continue reading ‘Source port routing’ »

Getting IP address and aliases in Perl

This piece of Perl code should get you IP address for eth0 into $ip variable:

my $ip;
my $device = "eth0";
if ((`/sbin/ifconfig $device`) =~ /inet addr:(\d+\.\d+\.\d+\.\d+)/) {
    $ip = $1;
}

If you’d also like to get a list of all aliases the device has, you could use something like:
Continue reading ‘Getting IP address and aliases in Perl’ »

Poor write performance on Fusion MPT SAS RAID controllers

If you’re have a hardware RAID controller using mptsas module on your Linux server, you may notice your write performance is extremely poor – i.e. some database workloads can be 30x slower than on other servers (i.e. using Linux software RAID).

An example card below – lspci shows:

02:05.0 SCSI storage controller: LSI Logic / Symbios Logic SAS1068 PCI-X Fusion-MPT SAS (rev 01)

How can you fix it? See below.

Continue reading ‘Poor write performance on Fusion MPT SAS RAID controllers’ »