Ok, that was getting ridiculous

After getting that error on the pt_comments table again, I went into mysql and tried a

check table pt_comments;

and it found an error, so then I did a

repair table pt_comments;

and it said it repaired it, but another

check table pt_comments;

found the same damn error again. So I shut off the web server (so I wasn’t getting hit with comment spams) and did a backup and restore of the entire mysql database, and the problem seems to be gone. For now. Maybe. We’ll see.

I don’t think MySQL liked the upgrade very much

Every time I go into my WordPress SpamKarma page, I get the following error:

Failed to purge comment spam entries.
Query: DELETE `pt_comments`, `pt_sk2_spams` FROM `pt_comments` LEFT JOIN `pt_sk2_spams` ON `pt_sk2_spams`.`comment_ID` = `pt_comments`.`comment_ID` WHERE (`pt_comments`.`comment_approved` = ‘0’ OR `pt_comments`.`comment_approved` = ‘spam’) AND `pt_comments`.`comment_date_gmt` < DATE_SUB('2006-08-14 11:36:26', INTERVAL 2 HOUR) SQL error: Incorrect key file for table './wordpress/pt_comments.MYI'; try to repair it

So then I go into mysql, do a “repair table pt_comments”, and repeat the purge operation and it’s fine. But some hours later, when I go back to the page, I get the same error. How do I repair this damn table so it stays repaired? Would doing a full mysqldump and restore fix it?

Server upgrade

I upgraded my server from Fedora Core 4 to Fedora Core 5 using yum. After going through all the .rpmnew and .rpmsave files and fixing configuration files, most things are working. A couple of annoyances:

  • It no longer puts items in /etc/fstab for usb storage devices, so I have to find what device the disk has been assigned and mount it manually. I’m hoping I can find a solution to that.
  • Can somebody please tell me why the people who wrap the PostgreSQL binaries in an RPM can’t figure out how to do a pg_dumpall in the %pre at the beginning of the process, and a restore of the backup in the %post at the end? The init.d script refuses to start up if you have an 8.0.x database on an 8.1.x PostgreSQL, so after the upgrade you have to go “oh, shit, the last backup I made was …” and restore it. If you’re not the sort of person who dumps the database every night to a file on your USB disk, you’re screwed.
  • WordPress was refusing to clear out comment spam because of some index issue, and then claimed that the table had “crashed”. I had to fumble around with mysql_upgrade, mysqlcheck, and myisamchk to get that straightened out.

So far, knock wood, those are the only issues. The PostgreSQL one is, to me, indicative that the Fedora Core team don’t really care about preserving data. I haven’t tried, but I bet you anything the Debian people don’t just say “oh well, if you didn’t back up you’re screwed.”

The Good, the Bad, and the Ugly

I went for a flight today. The main reason was just to try out my new HALO headphones. But the other reason was that it has been a beautiful weekend, only two of the planes have been booked for a few hours each, and I didn’t get my flight to Oshkosh. The maintenance coordinator for the Lance has been his usual uncommunicative self, so I had no idea if it was back from maintenance again. I booked an Archer instead. When I got to the airport, the Lance was there, but when I attempted to change my reservation the ScheduleMaster site was throwing ASP errors. Oh, what the hell, I can fly an Archer can’t I?

While I was waiting for the fuel truck, there was a guy taking delivery of his brand new Diamond Star DA-40. What a beautiful plane! Wouldn’t mind having one of those on the flight line.

I started the plane up, and found that I wasn’t getting any sound in my right ear with the new headset, so I switched over to my old familiar Dave Clark DC10-13.4s (with the Headsets Inc ANR kit). Take off was faster than I’m used to – these Archers are lighter than the Dakota and Lance that I’ve been doing all my flying in. I didn’t have any plan, so I just headed out due west. By the time I got to Batavia, I decided I needed to get the wind farm waypoint back in my GPS, so I headed down in the right general area until I spotted it. And after I got that waypoint, I decided I needed the railway trestle in Letchworth Canyon as a waypoint as well, so I headed down that way.

I was in smooth air with the plane trimmed for level flight, so I thought I’d give the HALOs another try. I put them in, and had the same problem with them as before. But this time I remembered that they have a Mono/Stereo switch. The guy demonstrating them at Oshkosh had a stereo intercomm, but the plane doesn’t. Switching it to Mono cleared that problem up immediately. At first they didn’t seem like they were blocking out the sound very well, but the foam expands pretty slowly and after a half a minute or so they were blocking as well as the Dave Clarks, if not better. It seems like they were blocking different frequencies though. The engine sounded different.

After I got to the trestle, I flew up the Letchworth Canyon. While I was going up, I decided to have some fun and tried turning to follow all the twists and turns of the river, like you see those “low and slow” guys doing in their Cubs and float planes. Of course I was at my usual 4,000 feet. But along the way I thought about my usual ground shyness. If I was going to fly the twists, I might as well try to fly a bit lower. Not down in the canyon of course, but at a nice legal 500 feet above any people or structures. So when I turned to head down, I was down at 2,000 feet, which is probably actually more like 1,000 AGL. Hey, small victories, right? The ground rises towards the trestle, and I crept up to 2,500 feet. It was fun.

When I was in the area, I thought I’d do some touch and goes at Perry-Warsaw. There was practically nothing on the CTAF except a bunch of guys with thick Pakistani accents talking from some place near Toronto I think. I don’t know if it was the narrow runway or what, but I found myself quite high on final both time – the first time I had to slip like hell to get down. And the second time was better, but I still landed pretty hard. I quickly switched the radio over to 121.5 to make sure I hadn’t turned on the emergency beacon (ELT), and was relieved to find it wasn’t quite that hard. That was bad. After that, I decided to come home.

I wasn’t high or anything, but I still have problems with speed control on final. I rounded out, but was a bit high, so I put the nose down a tad, but almost immediately lost all lift. I bounced twice. Oh, that was ugly. Once again I checked the ELT, and it wasn’t on. Phew.

As I was tying down, the DA-40 was coming in. It’s such a nice plane, and I think the fully castering nose wheel would be really handy for ground handling.

I still want to go out in the Lance to try the HALO. Maybe next week.

Well, that was fun

I noticed my backup USB drive wasn’t mounted, so my nightly backups hadn’t been happening for I don’t know how long. And when I tried to mount it, it mounted in USB “fast speed” mode, rather than “high speed”. I tried a few things, and I still couldn’t do it. So what the hell, I thought, it’s been over 6 months since my last reboot – yum has installed several new kernels, this will be a chance to use one of them.

Nice plan, but unfortunately the damn box wouldn’t boot. The first message I saw:

INIT: version 2.85 booting
mount: error while loading shared libraries: libcryptsetup.so.0:
cannot open shared object file: No such file or directory
awk: cmd. line:1: fatal: cannot open file `/proc/mounts’ for reading
(No such file or directory)

I booted with a rescue disk, and discovered that the thing it’s complaining about, libcryptsetup.so.0, is in /usr/lib. And guess what: /usr is a different partition than /, so it isn’t mounted before /etc/rc.sysinit runs. After a bit more investigation, I found that /usr/lib/libcryptsetup.so.0 was installed by a weird rpm, and that it’s used in mount and umount. I couldn’t understand why the Fedora team would be so stupid as to disobey one of the first tenants of Unix: that the system should be able to boot without /usr. mount is installed by the util-linux rpm, and I had this strange util-linux…crypt.i386.rpm. That word “crypt” in the name was evidence that it wasn’t a normal rpm. And “rpm -qi” showed that it didn’t come from Fedora. That’s when I realized that when I’d installed the yum repository for “postgrey”, I hadn’t excluded all the other packages from that repository like I should have. And this had dragged in these crappy packages.

The first thing I did was try to “work around” the problem with files in /usr/lib by copying libcryptsetup.so.0 to /lib and booting again. But that failed, complaining about another file. So I went back to the rescue disk and tried the same work around with that file, but this time it complained about yet another missing file. I realized this could be a long process.

So now I had to get rid of the bogus versions of mount and the other files that depended on this stupid crypto stuff.

Next thing I did was go to the proper Fedora upgrade site with my laptop and download the latest real version of the util-linux rpm. Then I transferred it over to the Linux box using a USB pen drive (lovely useful things, aren’t they?). The rescue boot image mounts your Fedora file system under /mnt/sysimage, so I did a “chroot /mnt/sysimage” and tried to do an “rpm -Uvh –force” on that rpm, but it didn’t work. It gave some ioctl error. At this point I really wasn’t sure what to do. I contemplated trying to combine my / and /usr partitions into one big one and making that the boot point, but I didn’t relish the work it would take to stitch everything back together.

I started downloading the Fedora Core 5 DVD image as a backup plan, but Bittorrent was telling me it would take 6 hours.

As a desparation move, I tried booting a Knoppix 4.1 boot CD I had lying around. I manually mounted the disk partitions where they belonged under /mnt/hda6, and chrooted to it, and this time “rpm -Uvh –force” actually worked. Hooray!

I booted, and had a couple of minor hickups – nfsd had taken a socket that spamd wanted, so I was getting no spam filtering until I figured out who had the socket open and restarted everything that needed to be restarted. I also had to restart a ssh tunnel on my linode to get the mail flowing correct. I think everything is working – my blog is up, mail is flowing, news is flowing, I can NFS mount my music onto my laptop, and all seems right in the world.

But I’m up, I’m running, and I’m a little less sanguine about installing new repositories into yum. Time to go to bed.