All new the
I'm worried that my Debian Planet credentials are a bit weak, so have a technical post rather than one discussing the fact I'm unemployed in 3 days, or that I'm going back to NI for a week after that to try and get the new house sorted. Oh. Wait. Ooops.
Anyway. While I still have easy datacentre access to my colo box (the.earth.li) I thought it might be a good time to think about upgrading it. The most limited resource has been disk space; it was a Dell 2550, so dual PIII-1GHz + 2GB RAM which is nice, but SCSI hotswap drive bays. So nice disk, but anything large is expensive. I think SATA has come along nicely, so was happy to change over to using that instead. As it turned out the old machine was over 5 years old (doesn't time fly!) so there's been a disk performance boost anyway from using new technology.
I ended up buying the new machine from Sentral - their website isn't great, but they're very helpful by email and Black Cat had bought machines from them in the past with no problems. It's a Core2Duo E6600 with 4GB RAM and 2 * 750GB Seagate ES SATA II drives in hot swap bays. I pondered a quad core chip and an extra drive (there are 4 bays total), but decided I didn't really need them at present and keeping power consumption down was a good idea.
Last time I upgraded the I just did a straight copy of the data over to the new disks. This time there were a couple of things that meant I didn't want to do this.
Firstly, I decided to go 64 bit. The chip can do it, I have 4GB RAM, it
seemed like a good idea. That meant a dpkg --get-selections
on the
old box followed by a dpkg --set-selections
on the new one, followed
by an apt-get dselect-upgrade
. Is there a way I could have kept my
aptitude
knowledge about auto installed packages? I did have a look,
but didn't see anything obvious.
That gave me the same packages. I also installed ia32-libs
to ease
the transition for my users who had self compiled bits. Then I had to
copy the rest of the data over. /home
was easy enough, plus a few
other filesystems that didn't have packaged data on them. I manually
reviewed changes in /etc
but there wasn't anything non obvious
thankfully. /var
was trickier. I was pleased to discover that
Mailman config appears to cross
archs quite happily. A pg_dumpall
did the trick for
PostgreSQL. Rebuilding the overview
database for inn
took all night. Maybe I should move away from
tradspool. There were a few other things to fix up (I hate Berkeley DB),
but by and large it wasn't as bad as it could have been.
Oh, except that copying that much data across takes a long time. And
rsync
isn't that much help when the data includes lots of mail
folders, some of which are over 1G big (and receiving mail, so
constantly changing). I'd started out with a 100M link between the old
and new machines, as I hit the e1000
Tx Unit Hang
bug. Disabling the power management solved that, giving a 1G link. Still
took ages.
The second major change with the new box is I've decided to go Xen. That
should let me hand out machine slices to users who want to do weird
stuff, without me really having to support them. And allow me to throw
up test machines when I need to. This was actually really easy to
install. I did a basic etch install onto a 2G partition, installed
xen-linux-system-2.6.18-4-xen-amd64
and then rebooted and had a dom0
up and running. I gave the main VDS (ie replacement the) a 600G
partition, access to both processor cores and 2G of RAM - ie still quite
a few more resources than it used to have. Then it got a bit tricky. I
wanted lvm to be available within the VDS. So I did all the VG creation
and a base install (using debootstrap) from the dom0, then added a
filter to /etc/lvm/lvm.conf
to exclude /dev/md2
(the 600G
partition). And tried to boot the domU. Which was fine, until it tried
to mount the root fs at which point the initramfs complained it couldn't
find /
and bombed out to a shell. The confusing bit was that doing
vgcreate -a y
found and brought up the lvm partitions fine, at which
point the rest of the boot process would complete. Very odd. Much
digging eventually led me to discover that the LVM initramfs script only
gets run if the specified root partition has a -
in it. Argh! I
prefer the format /dev/<vgname>/<lvname>
, but once I
changed to /dev/mapper/<vgname>-<lvname>
it all worked fine.
The new machine has been in service for the past week and so far it all seems fine. I don't notice the fact it's a Xen instance and it still feels quite nippy. Plus the extra disk space is great as I don't have to worry so much about things getting full. Yet. I haven't noticed a change with the 64 bit side either, but I think on a server that's going to be much more the case - I haven't moved my desktop to 64 bit primarily due to the lack of Flash and Java plugins (I don't see the point of a chroot as there's not really a pressing reason to go 64 bit if it's going to be hassle). I threw up another domU instance to test out some bits and that went smoothly too (I'm using an LVM VG on the dom0 to share out to the other domUs, which will all have a less complicated setup than the main one). So all in all I'm pleased with both the hardware, and the software - I hadn't expected setting it up to be so easy. My last Xen experience was under sarge where it hadn't all been integrated in the same way as it is under etch.
Oh, one other thing I did; I rebuilt the AMD64 netinst Etch CD to output
to the serial console for both isolinux
and the actual installer. And
then did the install over the serial console, even though the machine
was beside me. The CD is still in the machine which means that I have a
fallback if it all falls over horribly - I can access the BIOS, tell the
machine to boot from CD and then hopefully prod and see what the issue
is. Or even do a complete reinstall if necessary. It was surprising easy
to modify - I just had to edit isolinux/isolinux.cfg
and add
SERIAL 0 9600
at the start and then
console=ttyS0,9600 cdrom-detect/eject=false
to the append
lines
for kernel parameters. Definitely worth considering if you have a colo
box properly serial consoled up.