chkconfig, mysql

A crash today brought home a couple of things that I should have known before but didn’t, and now I do. I’m writing them here so I don’t forget, but also because google results were annoyingly useless without digging.

#1: chkconfig. That funny line in the init script that says something like “# chkconfig: 23456 88 22″. It’s easy to find out that the first batch of numbers is runlevels, but less easy to find out the meaning of the second set. They’re priorities; the higher the first number, the later in the boot process it starts. The higher the second number, the later in the shutdown process it’s killed. Also, if you change those numbers – this is obvious in retrospect, but I forgot – you need to re-run “chkconfig on servicename”.

This is apparently all defined in the LSB. Back in my day, there was no that thur LSB, never mind chkconfig. You just put scripts in /etc/rc.d and crossed your fingers.

#2: misamchk. This worked fairly well on my 72GB RAM server with a ~25GB database:

myisamchk --fast --update-state --force --sort_buffer_size=1G \
--key_buffer_size=2G --read_buffer_size=512M --write_buffer_size=512M \
/path/to/db/*.MYI

The myisamchk manpage talks about “a lot of memory” being 512M so obviously it could use a bit of modernizing. That, or it really is MyFirstDatabase.

And this kind of stuff reminds me that while I need to keep my hand in, I’m just as happy to no longer be a sysadmin for a primary job duty.

(Edited Aug 2012 – neither should typing be, chkconfig on, not chkconfig start.)

FOSS Politics

If the Debian team in particular, and the f/oss movement ever want to know why most of the world considers them insane (I hesitate to say “irrelevant”, but that’s what came out first), the Debian team’s response to this bug report might illuminate them.

For myself, I gave up on Debian after two libc / glibc upgrade SNAFUs in a row, along with the continued promise of “a really cool package manager Any Day Now, We Really Mean It” that was apt.  The sarge release was the final nail in the coffin.  It was last week when I installed my first etch box, and that was only out of personal interest.  We went from being a huge Debian shop to having it as an afterthought; there’s now more SuSE in our offices and server rooms than Debian, something I’d have thought impossible two years ago.