Kurt McKee

lessons learned in production

Archive

Hey there! This article was written in 2004.

It might not have aged well for any number of reasons, so keep that in mind when reading (or clicking outgoing links!).

A couple of lynch pins

Posted 4 November 2004

There's some cool technology coming down the pike. First of all, ReiserFS 4 has been released. It's not yet stable in the Linux kernel, but when it goes stable I'm going to be all over that business. Second, udev is going to rock. That, combined with Gnome and the associated technologies, is going to make using Linux a true breeze.

ReiserFS is a file system that blows the pants off of everything else out there. This 4th revision is going to be plugin-based, and truly atomic. What that means to you and me is that if you need extra functionality, like file encryption or compression, the plugin architecture allows for that functionality to just be added in. The concept of an atomic filesystem is even more important.

Most people, myself included, think that if you've got a file you're trying to save to disk, and the power goes out, you'd want at least some of the file written to disk, even if it means a lengthy recovery process. But consider this: if you're trying to transfer $100 from one bank to another, there are two stages. (1) The money is subtracted from the first account, and (2) added to the second account. You certainly don't want the former to occur without the latter occurring as well, or else you're out $100!

ReiserFS 4's atomic transactions mean that a file is either completely saved to disk, or it completely isn't. It simply won't be possible to corrupt the filesystem because of this. Plus, ReiserFS is a journaling filesystem, which means that it keeps a log of what it's about to do before doing it. You know how in Windows when you shut down the computer improperly it does a scan of the hard drive when you boot up to make sure the filesystem is sane? That takes a little bit, right? Thanks to journaling, in ReiserFS this is about a 2 or 3 second process. It merely checks the log to see what it was last about to do, checks whether it happened or not, and makes note of it.

Another big feature is Logical Volume Management. This is a concept that Windows has had for a while, although there are some implementation differences. Under Linux I can dump multiple hard drives into a computer, logically group them into one big hard drive, and I'm in business. I can also take one hard drive and make it into multiple logical drives. Doesn't sound too special, right?

Using LVM and ReiserFS, I can expand and shrink logical drives while I'm still using the drive! Suppose I've got someone sending me movies and audio from some event, and my hard drive is running low on space. In theory I can attach a second hard drive, and while they're still copying, logically extend the first drive to encompass the second drive as well. Voila! (In practice, I don't have a second hard drive).

When udev and ReiserFS 4 go stable, I'll do a complete reinstall of Linux (since I have to wipe the drive to upgrade to ReiserFS 4). It will be beautiful.

☕ Like my work? I accept tips!