Some observations on rebuilding a box with Ubuntu

Ubuntu is now one of the most popular Linux distributions, so I decided to give it a try for my box. At the very least, I’ve had a Debian box that’s been fairly easy to keep current for years, so I’m not too scared about using any Debian-based distributions.

I rather like Debian’s APT packaging system. There’s a nice command line interface to most of it and a web interface to find packages. I’m pretty sure it’s about the best packaging system you can make without fundamentally changing the way things work.

I was introduced in 1995 or so to the beauty of logical volume management. This was on HP-UX and, ironically, the HP-UX LVM is the basis for the Linux LVM.

The nice part about it is that you can define a bunch of partitions in a fairly flexible fashion (so you can prevent the log partition from taking up more than it ought to and making sure that mail always makes it through) and leave a huge pool of empty storage for later adjustments. Couple this with the basic support for mount points on Linux that work in ways that the equivalent Windows features don’t and you’ve got a pretty advanced set of tools for the sort of storage that I do.

I’m in the process of retiring some old drives. But they still work, so I’d like to safely squeeze as much life out of them as I can. Really, what I want is a generic “bunch-o-drives pool” to put them into that will have RAID5-ish pools made out of the various storage elements. I ended up having to make a rough approximation with partitioning where there are several RAID partitions so that I end up with three RAID arrays, one that covers all of the drives, one that covers all but the 80gb drive, and one that covers all but the 80gb and 120gb drives. And, since LVM doesn’t have fully polished fault-tolerant RAID1 and no RAID5 to speak of, I set them up using md instead of LVM… although this ends up meaning that these RAID partions once they are filled can be set up as LVM so that I can at least migrate volumes around. I like a lot of the ideas in ZFS, but I kinda feel like they’re trying to bundle up LVM + MD + FS + other stuff as one big monolithic chunk and that’s not The Unix Way.

Anyway, the total online data storage available in my household has passed 2 terabytes. This may take a little getting used to, because I remember the day when we were talking about 140kb disks. I did realize, to my dismay, that I have some drives that are well overdue for a decommissioning.

So how do you move disks over, anyway?

See, I wasn’t sure what the disk device names would be on a new Linux system with a totally different layout for things.

So, I looked through the results from a web search and found this little post and made sure that I knew exactly what fdisk -l would do — list the available partitions on your system. And then I was just able to follow the instructions from the LVM HOWTO to set up the volume groups on the old drive and stuff..

A practical example of hard drive failure

So, I got a happy little system running for a few days, with all of the packages I wanted installed. And so I think “Okay, it’s set up”

Then the new hard drive went haywire and failed.

Good thing I had all of the important stuff backed up. First time I’ve ever had a hard drive fail within days of getting it.