Valery's Mlog

Mindlog of a Freak
April 16th, 2005 by Valery Dachev

Mantra Updates

I had been planning some updates of Mantra (my machine co-located at Bulgaria Online) for a long time. Today I finally made some of them. It’s Debian GNU/Linux (testing), but the kernel was old – 2.4.27 with grsecurity patches applied (the latter made the machine resistant to several local attacks). I switched to a brand new 2.6.11.7 vanilla kernel. BTW, don’t forget to install the latest version of module-init-tools (“apt-get install module-init-tools” in Debian), otherwise you’ll maybe get the following message:

QM_MODULES: Function not implemented.


When I bought that server, I took two identical hard disks Maxtor 6Y080P0 (80Gb, ATA/133, 8Mb buffer, 7200 rpm) so I can create three software RAID-1 (mirroring) partitions (/, /home and /var). However, on the very first week one of them just stopped working. The company I bought the disks from changed the failed one with a new Western Digital Caviar WD800JB (80Gb, ATA/133, 8 Mb buffer, 7200 rpm). Two months after the warranty of the second Maxtor expired, it failed too. I ran for a second Western Digital and made a brand new Debian installation on it at home. I could not create the partions as large due to the different disk geometry. So I had to make a new array with smaller partition sizes, copy the data on it and add the old partitions to the new array. However, I had to create the RAIDs one device each, because debian-installer rc1 refused to create a RAID array when one of the disks is missing. The solution is to grow the array to two devices, but you can’t do that with 2.4.x kernel (or at least with < =2.4.27 kernel) – mdadm’s “–grow” option just didn’t work. I had to do daily backups of everything on the second disk, until I change the kernel. Today I did that:

# grow the /dev/md0 array to the desired raid disk number:
mdadm –grow /dev/md0 –raid-disks=2
# zero any RAID superblocks left on /dev/hdc1
mdadm –misc –zero-superblock /dev/hdc1
# add /dev/hdc1 to the array
mdadm –manage /dev/md0 –add /dev/hdc1


It everything’s fine, a message like “md: syncing RAID array md0” should appear in the syslog. RAID syncronisation status cat be watch in “/proc/mdstat“.

However, there’re a few things that need to be fixed urgently. I’ve overlooked the fact that “hyperthreading” doesn’t work at all, although it’s compiled in the kernel. The reason turns to be very simple – it’s not enabled in BIOS :).

In addition, 512 Mb of RAM seem to be extremely insufficient to carry dzver‘s PHP webchat. It’s not a “refresh chat” – there’s a main frame (used to communicate with the IRC server) and other frames communicate with the main one using shared memory. This means that every client has a dedicated Apache thread and it make the webchat too much memory consuming. This can be solved by using a PHP application server, but the only project I came accross was PHPlet. It’s strange that there’s no much interest in it and the latest release was a year and a half ago. Anyway, I personally prefer upgrading to 1Gb of RAM, instead of rewriting this webchat.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: