Thursday, October 13. 2005
# strings /lib/modules/2.4.20-4GB/FastTrak.o | \
> grep fasttrak_ioctl | uniq
fasttrak_ioctl not support the fun (%#x).
fasttrak_ioctl: Drive not exist.
#
Wednesday, October 12. 2005
It was more complicated than I thought, but it finally was and therefore is possible to move a system from (Software-)RAID-1 using 2 disks to (Software-)RAID-5 using 3 disks without the help of an additional disk during transfer.
Some things I had to keep in mind:
- One harddisk (say, hda) has to be excluded from the RAID-1, i.e. it must be marked as failed. Otherwise the array would automatically get re-assembled at boot time, as the partitions are still flagged as type 0xFD (“Linux RAID autodetect”). The boot manager needs a new entry to boot from this one. The /etc/fstab on hda needs to be modified not to mount the md-devices, but the hda-devices only.
- Using an additional PCI ATA-controller, it appears as SCSI boot device in the BIOS. If hda is hanged over to this one, make the SCSI device the first to boot from. The kernel needs support for the controller’s chipset compiled in. Note that the devices on the PCI ATA-controller appear as hd[a-d], and those on the mainboard’s controller come afterwards!
- It is then possible to create a degraded RAID-5 with the two other disks:
# mkraid --dangerous-no-resync --really-force /dev/md1
RAID-5 knows the two states ‘dirty’ (i.e. up and running) and ‘clean’ (right before shutdown). RAID-5 does not re-assemble automatically at boot time and ‘raidstart’ fails if the array had not been marked as ‘clean’ before. You need mdadm to mark the array as clean for the first time:
# mdadm --stop /dev/md1
# mdadm --assemble /dev/md1 /dev/hdb2 /dev/hde2
- As in my case the count of the md-devices now has decreased from 8 to 4, I had a problem with the “Linux RAID autodetect” partitions on hda - They still try to reassemble themselves at boot time as /dev/mdx for x>3! Therefore, I had to use those automatically detected md-devices instead of the pure hda-devices in the /etc/fstab of hda, although they contained the hda-devices only. But that was not consistent: Booting from a Linux live-CD, the numbering of the md-devices changed its order *forever*, i.e. the changed order remained even after booting from the harddisks again!
To handle that problem I started freshly with a different strategy: I duplicated the partitioning of hda to the other two disks and recreated the original RAID-1 arrays there. Then I could do a (backup) sync from hda to the RAID-1 devices. After rebooting from that RAID, I flagged the partitions of hda as ordinary Linux partitions - The data even remained intact! Rebooting from hda as root, there was no more autodetection of the hda partitions and I could create the RAID-5 with the other two disks as mentioned above.
After that I could do the usual mounting, rsync’ing and dual booting, praying that no disk fails right in that “degraded array phase”. As everything seemed to work, I repartitioned hda and raidhotadd’ed it to the running system. The sync for the 147GB array took about 90 minutes.
Monday, September 19. 2005
As my current workstation only supports ‘slow’ PCI, there wouldn’t have been much sense in buying SATA-disks. Therefore, I have ordered a third hard disk of the given type. This will enable me to create 3x 78GB partitions which will result in a 156GB logical volume running on (SW-)RAID-5. On this I want to create a 120GB /home partition - this will be more than twice as much as I have today.
In addition, another 512MB of RAM and a USB-2.0/FireWire PCI card are coming soon.
For the server I bought two simple 20GB ATA disks, to be put on (SW-)RAID-1. This will carry the /home partition. As devil wished, one of the two SCSI-disks carrying the system crashed while building the two ATA disks in. So everything delays until the spare SCSI disk I ordered replaces the broken one.
Wednesday, September 14. 2005
Whenever sendmail has to deliver mails to other hosts which cannot be reached at that time, the messages are kept in the queue and are marked as “Deferred: Connection timed out”. Although the other hosts could be reached again and you want to tell sendmail to flush the mail queue, the command
sendmail -q -v
does not really try to reconnect to these hosts and still assumes that the connection timed out. The reason is that the hoststatus is cached, per default for a period of 30 minutes. Using
sendmail -OTimeout.hoststatus=0m -q -v
you can re-run the mail queue and force sendmail to reconnect to the hosts. You may want to define an alias for that, say, ‘sendmail-flush-timeouts’.
You can set further options in /etc/sendmail.cf.
Wednesday, August 31. 2005
I had a nightmare this night: Someone had hacked my server evily. Whatever command I tried to execute, strange log lines appeared on the terminal which looked like shell code installing a rootkit and sending passwords to an e-mail address. He/she even activated an HTTP-proxy which hijacked requests from within my network to some weird other URLs. As additional ‘fun’, the cracker replaced simple commands like ‘ls’ or ‘less’ with some counterpart like ‘rm’, such that I ruined the system more and more by myself. In my dream, I now had to spend all night to set up a new system with a bad feeling about not having enough know-how to conserve the broken system for forensic analysis. Please, dear crackers, don’t do it like that.
Tuesday, August 30. 2005
I successfully stitched together my first panorama pictures on GNU/Linux. I used the GUI frontend hugin, which itself uses autopano-sift for automatic detection of mapping points. For the actual stitching process I used enblend, but not from within hugin, as there currently is no possibility to watch it progressing. This tutorial helped me doing my first steps, more tutorials are available on hugin’s website.
My first try was on a series of 3 pictures of a rainbow above Vienna, Austria:
Next, I created a panorama picture of a mountain view consisting of 8 pictures, which I took last october near Kitzbühel in Tyrol, Austria:
Installation of these tools was quite easy, as I use a distribution which includes such cutting-edge multimedia programs in its package tree: Gentoo Linux.
Thursday, August 25. 2005
Free space is getting small on my workstation as well as on my web-&-mail server, and I want to set up a separate firewall computer anyway. My first idea had been to use my current workstation as server, turn the current server to a firewall and get myself a bleeding-edge shiny new workstation.
But I found a cheaper solution: As the only real reason is missing space - my workstation CPU and RAM are still big enough, and I don’t do any gaming anyway -, I will buy a SATA-controller with 2-3 new 200GB SATA harddisks for my workstation. Then I will purchase an average PC by auction, put my current workstation harddisks (2x 80GB ATA) into it and set up a Debian Testing system on it - this will be the new server then. When everything is tested, the old server with the old, old 2x 4GB SCSI harddisks will become an OpenBSD firewall.
With three 200GB disks on RAID-5, I would then have 400GB space to waste for music, movies, video editing and other things.
Update: As my mainboard doesn’t have 64bit PCI, it’s getting a bit trickier than I thought. I don’t really want to buy 3 new harddisks of a dying technology, so a simple additional ATA controller and a third harddisk of the given type could be the solution for my workstation, but what about the server and firewall then? I still have to think about it.
Update 2: I will keep an even cheaper solution: A simple PCI SATA-controller with 2 new harddisks on (SW-)RAID-1 will do it for a while on my workstation, RAID-5 has to wait for another day. The solution for server and firewall will stay as mentioned above.
Tuesday, July 26. 2005
If RCS is used separately from CVS (e.g. for system configuration management), I sometimes want to know whether there are any uncommitted changes pending. Here’s my bash alias to get an overview: alias rcschanges=’for file in $(for rcsfile in RCS/.??* RCS/*; do echo $rcsfile|cut -d, -f1; done); do [ -f “$(basename $file)” ] && rcsdiff $(basename $file); done’ Maybe you want rcsdiff to be an alias for a home-made rcscolordiff, which itself simply calls rcsdiff $@ | colordiff --no-banner.
|