Inside baseball, Linux edition

I love the title of this article: “
¿Por qué SystemD es una mierda?

Too tired tonight to read the whole thing in Spanish — I’ll feel dumb if the implications of the title aren’t their point — but wanted to share somewhere. Disabling the FB/Twitter publicize for this one for obvious reasons if you can follow the literal translation.

Fun with Gentoo

Nightly auto-upgrades are great, except when they aren’t. In this case, going from app-misc/screen-4.0.3-r7 to app-misc/screen-4.2.1-r2 changed the default SCREENDIR from /run/screen to /tmp/screen. Normally wouldn’t care, but I had running screen sessions and couldn’t get in; oops!

Only realized about the SCREENDIR variable after I’d already downgraded back to 4.0.3-r7.

What I was doing at age 18

I recently realized that a very important aspect of what I have done for the past year in my day job is echoing how I got started in my career. That is, I spent a bunch of time last year and this year justifying a large technical project — in writing for a less-technical audience — and then working with other people to get it organized and deployed. I’ve also recently in my work gone back to that project — documenting the project so that other folks could finish it, and a non-IT PM could manage it — so that I can get back to programming.

Realizing that, it inspired me to see if I still had the documents I’d written for that original project. It turns out, I did — both the original proposal, and a mid-year budget for the actual ordering once we got the project approved.

So, what was this project? Getting my high school computer lab on a LAN, and on the internet — the latter isn’t mentioned in the original proposal, so I guess it was scope creep, but it was awesome. The project lead to my first full-time summer job and my first full-time job when I took my break from Dartmouth (both doing Novell server admin work plus some desktop support) and I’m pretty sure the project itself — still underway — made a difference in my college applications.

A PDF reconstructing the original documents is here: Networking Computer Resources for Hunter College High School: A Modest Proposal Below the break, reminiscences and a text version of the document itself.

Continue reading “What I was doing at age 18”

Manually cleaning an Intel (or other TRIM-able) SSD with hdparm

Figured this might be a useful snippet of perl for other folks. When I rebuild my system last Nov, I wiped the drive with the following:
my $a = 0;
while ($a < 312581808) { my $b = 60000; if (($a + 60000) >= 312581808) { $b = ($a % 60000) - 1; }
print "\n$a: ";
`hdparm --trim-sector-ranges $a:$b --please-destroy-my-drive /dev/sdh`;
$a = $a + 60000;
}

To use, mount your SSD on another system (or use a system rescue CD or LiveCD with a new enough version of hdparm) and replace “312581808” with your actual number of sectors (check with fdisk -l or similar) and /dev/sdh with your actual drive.

The tricky parts were:
(1) Figuring out the syntax, although I suspect that it’s better documented now.
(2) Figuring out the 60,000 sector limit (actually 64k/65,536? Dunno. 60,000 exactly worked.) I’m not sure if this is an hdparm limit or an Intel X25M limit.

Manually installing JDKs on Gentoo

In case it’s useful for anyone else, if you run the ___.bin installer and see this:

bin/java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Check if rt.jar exists in the unpacked directory. If it does not, check if rt.pack exists. If it does, it means that the installer is missing a step.

Rerunning with the command-line options:

"____.bin --accept-license --unpack"

…will fix what ails you by making it unpack those files. If you no longer have the installer, google indicates that there is a program out there called “unpack200” to unpack the .pack files to .jar, but I have not had a chance to try it.

Recovering deleted/truncated files on ext4

Due to a bit of stupidity I spent a lot of time looking into how to recover deleted files on ext3/4 and I thought it would be useful to other folks to pass on the following points after the break.
Continue reading “Recovering deleted/truncated files on ext4”

An interesting night…

  • First, I discover this afternoon that my server has rebooted on an older Kernel and the SATA drives aren’t being recognized. No wonder it’s going so slow; the RAID is running in degraded mode (not inherently slower for RAID0/mirroring, but in practice it’s going to mean that the system does everything much more carefully wrt flushing buffers and stuff.) So I had to rebuild that tonight; the Linux mdadm tool made that surprisingly easy.
  • Second, the phone line has gone tonight. No DSL, no nuttin’ – I host my own server, so I can post this now, but who knows when y’all are going to get to see it. And I think I’m going into some minor case of internet-access withdrawal (no dialup backup, since the voice phone is down too, but at least I have my PDA thing… slow though it is at home.)

Tech stuff.

Two quick notes:
1) WordPress 2.0 is out. I plan to upgrade when I get back to the states; I’m not convinced it’s really going to be an improvement, but I need to keep up to date with the security patches, so there’s not much choice. Hopefully my old style/theme will still work. If not, expect a very bland defauly style until I have more time…

2) ReiserFS sucks for news spools, even with “notail” on, at least on RAID1. I’d wondered if that was it, and it appears to be the case. My leafnode spool runs to about 1.5 million articles, and 9GB; when I put in the mirrored drives, I put it on it’s own file system and switched it from ext3 to ReiserFS. I noticed then that it took about 6 hours every day to run texpire, which seemed long – but I hadn’t been checking since it had been growing. Well, “notail” sped it up a bit but it still took several hours…. so I got fed up, and with the wireless here, migrated it back to ext3. On ext3? (with dir_index on, data=”ordered”, and commit=60) it took a whopping 12 minuts… or a 40:1 improvement.

I am so l33t!!!

There was planned downtime this weekend. The server now has mirrored hard drives, using the software RAID1 driver. And a hopefully much faster news spool on its own partitition, but that is a separate issue most of you are unlikely to see (if you actually know me in person and don’t already have one, do feel free to ask for an account…)

%d bloggers like this: