Defragmenting all fragmented MyISAM tables

I just had another look at what I wrote the week before last (you know, being home-sick/on vacation has it’s advantages) and additionally read up on " OPTIMIZE TABLE" again. The comments in the manual mention " SHOW TABLE STATUS", which gives you a complete list, but it doesn’t allow you to filter certain kinds of things out (like I only wanted to see MyISAM tables in the list, I only wanted database and table). ...

October 16, 2008 · 2 min · 276 words · christian

Adapter bonding on Linux

Well, today I had a rather weird error. I was testing the adapter bonding on one of the boxen designated as Tivoli Storage Manager Server, when I noticed that the bonding wasn’t working as expected when simulating an error (that is unplugging one of the TP cables for the bond). Now, the bond had “mode=6 miimon=100” as options. After running “linux bond debug” through Google (which turned up nothing useful, besides one document on the Oracle Wiki about IOS/Linux adapter teaming), I figured “Hey, just lets test switching the arguments.” And guess what ? ...

October 16, 2008 · 1 min · 115 words · christian

Windows Server 2003 Terminal services

Well, once you thought you don’t have any more problems, another one just pops up. I’m currently bashing my head against the wall, why the hell the forwarded (or is it redirected ?) drives are not shown in the in the “My Computer” explorer view. I pretty sure have an idea why (basically, HKEY_CURRENT_USERS\Software\Classes isn’t writeable, but that’s where Windows, or rather the Terminal Services – or whatever is creating the associations), just don’t know a clever way around/by it. ...

October 15, 2008 · 1 min · 117 words · christian

Setting up Linux-HA

Well, initially I thought writing the OCF resource agent for Tivoli Storage Manager was the hard part. But as it turns out, it really ain’t. The hard part, is getting the resources into the heartbeat agent (or whatever you wanna call it). The worst part about it, is that the hb_gui is completely worthless if you want to do a configuration without quorum. First of all, we need to setup the main Linux-HA configuration file ( /etc/ha.d/ha.cf). Configuring that, is rather simple. For me, as I do have two network devices, over which both nodes see each other (one is an adapter bond of comprising of two simple, plain, old 1G copper ports; the other is the 1G fibre cluster port), the configuration looks like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 udpport 694 autojoin none crm true use_logd on debug false coredumps false auto_failback on ucast bond0 10.0.0.10 ucast bond0 10.0.0.20 ucast eth2 10.0.0.29 ucast eth2 10.0.0.30 node tsm1 node tsm2 respawn root /usr/lib64/heartbeat/pingd -m 100 -d 5s ping 10.0.0.1 respawn root /sbin/evmsd apiauth evms uid=hacluster,root After configuring the service itself is done, one just needs to start the heartbeat daemon on both nodes. Afterwards, we should be able to configure the cluster resources. I find it particularly easier to just update the corresponding sections with cibadmin (the man-page really has some good examples). So here are my configuration files for two resource groups ( crm_mon doesn’t difference between resources and grouped resources, it’ll just show you that you configured two resources).

October 1, 2008 · 6 min · 1192 words · christian

Subversion via HTTP(s) and mod_rewrite

Well, I just finished my wild-goose chase with Apache and subversion regarding a rather weird error. I recently reinstalled our subversion box, and ever since then I was unable to commit anything new to any of the repositories. Subversion told me this: 1 2 3 svn-client admin-scripts [1] > svn ci -m "Directories for Tivoli Storage Manager Scripts." svn: Commit failed (details follow): svn: MKACTIVITY of '/svn/admin-scripts/!svn/act/someid': 302 Found Apache didn’t say much about it either, besides this particular line: ...

September 28, 2008 · 1 min · 198 words · christian

What's up, dude

Some people might ask, " Gosh, what’s up with you ?" .. Well I’ve been incredibly busy with work the last month (sheeesh, another month already passed by). We finally finished the public tender; gonna get some of the components next week (that is the library extension, the LTO4 drives and cartridges, two brand new Cisco MDS9134 and some Fibre channel hard disks for the existing DS4700). After work, I made my usual visits in the gym and well, after I was home some relaxing, kicking up my feet and doing nothing (as in zip). ...

September 16, 2008 · 2 min · 235 words · christian

zypper-update-report (was: patch2mail for SLES10)

Well, after some more refining I think I finally have a script I ain’t never gonna touch again (unless something breaks, which can happen quick as we all know). The script now uses a sysconfig file for the common settings (like sender, receipents, categories to scan for), so it may be deployed en mass. /etc/sysconfig/zypper-update-report 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ## Type: string ## Default: root ## Config: "" # # Sender address for the update report FROM="Yourupdatemonkey " ## Type: string ## Default: root ## Config: "" # # Receiver address for the update report #RECEIPENTS="tehsysadmin@barfoo.org" ## Type: string ## Default: "securty recommended optional" ## Config: "" # # List of groups, to include in the report CLASSES="security recommended optional" /usr/local/sbin/zypper-update-report ...

September 9, 2008 · 3 min · 487 words · christian

Custom macros in host definitions

Well, I was playing with the hostgroup inheritance earlier. One problem with that is, if you define a duplicate service Nagios is really unpredictable or rather inconsistent. Now, as Thomas Guyot-Sionnest told me, I should try custom macros for the check definition. So what I did was the following: templates/host-windows.cfg 1 2 3 4 5 define host { name generic-windows register 0 _RDPPORT 3389 } hostgroups/windows.cfg ...

August 16, 2008 · 1 min · 208 words · christian

Debugging rug

Well, it’s 7pm. I’m sitting at home and thinking about why in gods name rug isn’t adding my update repository. I can add the service using yast inst_source, but when yast then syncs with ZenWorks, it tells me something like: Failed to get repomd/repodata.xml; Reason: 530 - Access denied So my fellow co-worker turned on the debug-logging and we quickly found out why: rug isn’t using the command line credentials I was passing. ...

August 15, 2008 · 1 min · 126 words · christian

Suspected NRPE weirdness

Well, I just noticed a really weird thing, when you have command line arguments enabled. Here’s a snippet from my nrpe.cfg: 1 2 dont_blame_nrpe=1 command[check_disk]=/usr/lib/nagios/plugins/check_disk -E -w $ARG1$ -c $ARG2$ -p $ARG3$ Now, if you’d check the free space for the root, it ain’t gonna show any inode percentage (that one isn’t what I’m talking about). But if you have to use bind mounts like I do (Tivoli needs a separate " domain" -- that is a separate mount point for each domain), you might wanna check the free space on the real device, rather than the free space on the bind mount (which is gonna show you the free space of the parent file system - in my case the root fs). ...

August 10, 2008 · 2 min · 298 words · christian