22/01/2005
big fat koala bear chewin' eucalyptus leaves
This is the first in a series of back-dated site updates that have only just got around to being published
Nothing Is Ever Satisfactory
Roughly every year or so I decide some aspect of my system is totally retarded and needs redoing. For example this time round I decided
- I don't like the disc partitioning scheme on caco (the server)
- I'd also like to switch its filesystems to ReiserFS
- I really should implement that automated backup system I've been "planning" for years and years
- Having upgraded baron (the desktop) to Debian Sarge I want it on caco as well
So if I'm going to repartition the entire disc and change the type of the root filesystem I need to copy the whole system to a different disc and boot off that, but would involve swapping hard discs around and generally having to make too much effort. Instead I looked into live CDs and found System Rescue CD. The site says one of its aims is carrying out administrative tasks such as partition editing, and its kernel comes with stuff like LVM, so it seemed ideal. I downloaded it and found it was based on Gentoo, which is not what I'm used to but it wasn't too much of a problem. All distributions have the same basic GNU stuff.
Also it's no good if your disc fails and you lose both your live system and your backups because they're on the same disc, is it? So I put in an order for another disc. When this arrived and I had put everything on caco into archives and checked them several times I finally powered it off.
Anyhow I'm going on way too much here, all you need to know is it worked
- I put the new disc in, and repartitioned the original disc from the rescue CD
- Everything except the root and a swap partition is under LVM so hopefully the next time I decide the partition scheme is rubbish I might not have to reformat the entire disc..
- All the filesystems on disc are ReiserFS, which, if nothing else, doesn't take an age to fsck (even though the most common cause of fscks - power fluctuations - were taken care of ages ago)
- The rescue CD could be loaded entirely into memory so you could unmount the CD and put in a different one with the old hard disc contents on, and hence restore your old system's contents.
There were minor problems but they were dealt with
- I wish I'd thought of using the workbench my dad left here ages ago before. It was a lot easier taking the computers to pieces when they were raised up on a table than on the floor.
- It hurts your productivity to take fully four hours to pluck up the courage to overwrite your disc's partition table
- Say you've just planned to make the physical partitions, restore the root filesystem, then boot back into your old system in "emergency mode" to carry on. You've done the LVM stuff, and you're now ready to run mkreiserfs on your new blank volumes. This is not the point at which to find you never got round to installing reiserfsprogs. I laughed about this for about ten minutes.
- So you boot back into the rescue CD, mkreiserfs from there, and unpack all your tarballs. Unfortunately you fail to notice that you made them by saying, for example,
tar -lcf var.tar /var
so when you extract them withcd /mnt/disc/var/ ; tar -xf /mnt/cdrom/var.tar
you end up with everything in /var/var/ (and similarly for /usr) Thus you briefly have the crap scared out of you thinking you've lost all your files when you boot back into the system. - And finally, and indeed most insidiously, because the tarballs were made on a Debian system and extracted in the rescue CD environment, which as I said is based on Gentoo, there are subtle differences in the mappings between UIDs and user names. Thus when certain files are extracted they end up being owned by the wrong user. This creates a subtle degradation in service that you don't notice for some time; most of the files are
root:root
anyway, so nothing changes there, but for example I had something stuck in my mail queue for two days because exim (setuid 'mail') couldn't write files into /var/spool/exim (which had ended up owned by user 'man')
The last one had me stumped for a while, I thought, how on earth can I fix this easily, but thank goodness it didn't take long to fix manually with a couple of careful find
commands. Now all I have to do is upgrade to Sarge...