Category Archives: Computer joy

today, java is not my friend

One thing before I start my rant about java. It means two things: coffee and a programming language. Coffee, to be clear, is absolutely my friend. It makes me happy in the morning and keeps me awake at night. I treat it with respect and it helps me out.

Java the programming language, on the other hand, is not my friend. Let me explain.

At work we’ve been working on a piece of software that, from within a web browser, needs to open up a file on the user’s computer and send it up to a server. To make sure this works on pretty much every browser, the only real option is java.

So we look around for how to do this, even buy a source license from a commercial package that does something similar, and think we’ve got it figured out. The head programmer writes up a set of code that should do the trick, builds a signed jar file, and tests it out — it works! But only on the programmer’s computer.

Let me back up and explain something about java. Unlike most languages, it has two modes. The first is your standard “everything works” mode, where you write code, you run it like a normal program, and it just works. The second mode happens when you download java code from a web site and run it inside a web browser. In this case, there are a set of things you can’t do — you can’t make network connections, you can’t open local files, etc. — unless the code is signed and/or you specifically grant the program permission, either by clicking ‘Yes’ at an allow box or by modifying a java config file.

Continue reading

linux raid is not my friend right now


For a while now, I’ve been using linux software RAID 1 (2 drives, mirrored, so if one fails, you still have your data). The one thing I started to notice, though, was that Linux had no method to do ‘scrubbing’, or verifying that the data on both drives really is the same. NetApps have it, 3ware cards have it, any real professional RAID setup has it. Except Linux.

So every now and then I google for ‘linux raid scrub’, and see if someone’s done it. Thursday, I discover that yes, someone has! They added a user-requested data verify to kernel 2.6.18; you do echo ‘check’ > /sys/block/mdX/md/sync_action, and it starts a scrub.

So I download the kernel, compile it (a daylong process), and Friday night I boot the new kernel on one of my systems and start the scrubbing. I’ve been wanting to do this for a while, since I suspected one of the drives was starting to fail.

The scrub takes a while; it’s a pair of 300GB drives. The next morning, I discover that one of the drives has been kicked out of the raid, so I replace it (had one on hand just in case) and add it to the mirror.

What’s supposed to happen next is that the kernel sees a new drive as member #2 of the raid set, and starts copying the data from the first drive to the second. What happened in this case was that the kernel added the drive and said everything was fine right away.

However, everything was NOT fine; when reading from a mirrored RAID set, reads can come from either drive, depending on which one has its heads closest to the data. One drive had the data. The other didn’t. Chaos ensued.

So after trying a few different things, I began to realize that RAID1 in this new kernel was broken. Horribly horribly broken. I tried to manually start the sync, left it for the 6 hours that it took, and found that it still didn’t fix the problem (apparently it hadn’t actually synced data; now that I think about it, that probably saved my butt, since it didn’t try to sync the bogus data on the new drive back to the old one).

So I remove the new drive from the raid set, boot back into the old kernel, and add the drive again. This time it does what it’s supposed to; now the drives are happy again.

I went back to to look at the release date for this supposed ‘stable’ kernel; turns out it was released Thursday. Not sure how that document made it out there that explained how to do a manual raid sync (that doesn’t work), but it did.

So now I’m back on an old kernel, with a newly rebuilt RAID set, and a few more grey hairs.

I dislike hardware RAID cards since I never know exactly what they’re doing with the drive; I like software RAID since in theory I can figure out what’s going on, look at the source, putz with it, break a mirror and mount the drive on its own, etc. (I got burned once by a cheap raid card that lost its config and hence the data on the drives.) And I can’t afford a NetApp, which seems to do RAID correctly.

I know the people working on Linux software RAID are doing the best they can with the time and resources available to them. But yeesh; this weekend was certainly Not Fun.

why must pretty be big?

So I’m trying to free up space on one of my computers (all data expands to fill available storage space, don’t you know), and start looking at what takes up space. I’m using a nifty program called Disk Inventory X. It lets you visualize how much space is being used by certain files, and is very useful for figuring out how much space is being used by what.

One of the things I find is that iDVD, the DVD maker application that comes with the system, is using 1.5GB of space. 1.5GB! Even Photoshop only uses 153MB.

I do some investigating; as it turns out, the space is all used by the themes for the DVD menus. I suppose whoever crammed that much in there had the best interests of the user in mind; but on a system with only a 30GB hard drive, 1.5GB is a sizeable amount.

So now I just have to figure out if I’m ever going to use iDVD; I may just toss it, along with the MS Office Test Drive. But my mind still boggles; 1.5GB in a single application…

crazy big

So in idly browsing the web today, I find a link to Sun’s CEO blog, who links to Sun’s Tuesday press conference, in which they introduce their crazy new Sun Fire server, the X4500.

Sun Fire X4500 top view
image copyright Sun Microsystems

When I first started out doing computer stuff, I started on DOS and early Windows, then moved onto Sun Sparc and Solaris equipment. Ten years ago, Sun with Sparc was the workhorse of the server and workstation computing world. With the advent of Intel-based servers (and the fact that you can usually buy ten to twenty Intel servers for the same price as one Sun Sparc server that performs the same or less as one of those Intel servers), and Sun sort of became the slow creaky grandfather of servers — everyone had a few in their back closet they couldn’t get rid of, but the Intel computers stole the show and ran the new, exciting, intensive applications. Solaris was a pain in the butt, too, but it worked for the business application side of things. If you were a funky internet company, you’d run Linux or FreeBSD to serve those newfangled “web pages”, but the database backend (and the real value of the business) would always be running on Solaris.

So Sun struggled along for a few years to find their way; they went to the super-crazy-big stuff with the baby-Cray type E10k and E15k, and tried the SGI method of trying to sell an Intel box for twice the price after adding a few pieces of plastic to the case.

It sounds like they let the nutty engineers with clue back in the driver’s seat, though. They came out with a couple of very interesting products today, the most interesting of which is this Sun Fire X4500 system. It’s basically a 2-CPU (AMD64-based) system with an assload of hard disks — 48 500GB disks, making for 24TB of raw storage. Even if you RAID-5 those, that’s about 19.2TB of space. Now granted, Sun’s listing this for $70k fully loaded, so it’s not exactly within reach of a Mr. Average Middle-Class Budget like me (of course I’m thinking of the MythTV system from hell), but still — most “enterprise class” storage systems that would give you even 10TB cost way more than that, if you throw in the server and other stuff necessary to make it work. And it all fits in 4U of rack space. (Which, as the guy in the press conference said, lets you put 1 petabyte in 4 racks. Not bad, that.)

Continue reading

aaaaargh. my tires are properly inflated!

[updated 12/2006]

So, we have a 2005 Toyota Matrix. Nice car.

Except for the fact that the stupid tire pressure monitoring system doesn’t work right:

Picture of tire error light

The light is supposed to come on if one of the tires has incorrect pressure, indicating either “Put some air in”, or “You have a flat, dumbass”. There’s a button you’re supposed to push and hold when the pressure is correct in all the tires to reset the system.

In our car, however, the light seems to come on whenever the system feels lonely — that is, all the time. Oh sure, we can reset it, and the light goes away, pouting, for a few minutes. But then, after half an hour or an hour of driving, there it pops up again. “Did you miss me?” it seems to say. “I had a grand time being off, but I’m here to be on for you again!”

We’ve had the car in multiple times asking about it, to no avail. One time we were told that there’s also a sensor in the spare tire, so it had to be checked too. But nope — equalizing the pressure in all the tires (even checking to make sure the pressures are still equal after it comes on again) doesn’t help. And of course nobody has posted anything about it on the net. (Or my google-fu is not wise enough to locate the proper page.)

So now it’s kind of become a game; if the light comes on, hold the reset switch in (while driving) to see if there’s a stretch of road smooth enough that the tire pressures will be constant over the 5 or so second period that the system measures the pressures. I’ve had it happen a couple of times, which is surprising given the number of potholes in this town.

At some point someone may figure it out; meanwhile, the light taunts us in its yellow glowingness.

[Update 12/2006]: As it turns out, the issue was the valve stem in one of the tires. Apparently this system works by having special valve stems that have a battery and a transmitter which send the data to the car. When the battery dies, or one of the stems goes bad, you (or the tire shop) can replace it. This turned out to be the issue; the tires wore down, we had to get new tires, and (knock on wood) the light hasn’t been on since.

Rack mounting a Playstation 2, part 1

I’m not sure exactly whether anyone will find this useful anymore, but I have the pictures, so might as well put them to use.

A while ago we had a use for some Playstation 2 consoles running Linux. Nothing fancy (it didn’t even take advantage of the special chips and such in the system), but they worked.

Sony used to sell but recently discontinued a linux kit for the PS2 — basically it came with the network adapter, a hard drive, mouse, keyboard, VGA adapter, and a Linux boot CD. (You supply the PS2 and memory card.) Since we had more than a couple, we decided to rack mount them.

Middle Atlantic sells custom rackmount shelves to fit almost any product; they’re the company that custom home theater installers use to acquire form-fitting rackmount
shelves for almost any electronic equipment out there — and if they don’t have a
template in stock for your item, you can ship it to them (insured) and they’ll
measure it and make you a custom shelf. We got ours locally, but SmartHome carries them too. Note that we got the clamp option; without the two clamps that go above the PS2s, they’ll slide around a bit every time you try to do something to them.

Continue reading

why can’t computers just get along?

So here’s my current general frustration. Computers just can’t get along.

I have a Mac running iTunes. I also have an AirPort Express. The AirPort has an S/PDIF digital audio output, which I hook into my Denon receiver. The Denon receiver has an ethernet port; last year, there was a press release saying that “Real Soon Now” there would be a firmware upgrade so that the Denon could receive Windows Media (or something) broadcasts, and that they were in talks with other device manufacturers to support the same thing.

Continue reading