Categories: Top ::

Tech: Rebuilding the LAN, Migrating between FreeBSD's
Sun, 10 Jul 2005

You'll have to forgive my transgression into being overly specific to a topic few will care about, but its been a slow-post week and this might be handy for me to remember sometime :) (On the entertainmeny front, my wife has grown her Katamari to some 15 or so metre's in size and is enjoying picking up cars, houses and trees..)

Some of you will know that my oldest server (really just an old Compaq desktop I picked up used some 6 years ago) has been slowly eating itself lately -- some bad sectors or lost files here, some hanging at random times through the day/night there -- just slowly becoming too unfriendly. It could be just overheating, or clogging up of the fan intakes, or the hard drive going, a combination thereof or any number of things. Though this machine has worked hard (24-7 for 6 years, plus whatever time it did before I got it.. already a few years old and with broken ports then!) its way past retirement. I personify equipment, so this stoic machine will be missed... anyone want to buy some old RAM? :)


Mind you, I've been wanting to rebuild the LAN here for years, and break this machines duties up across a couple other machines. And really, when we get to it.. ripping down and rebuilding machines and LAN's is great fun since you only get to do it every few years. And you get to do some spending, always a great joy :) (Prices are way down these days, thankfully, so the replacement hardware is only a couple hundred. Whew!)

I thought I'd list a few notes I've made so far, as I'm a small part along the way (though I totally rebuilt the LAN in my little office, so that was sweaty but fun work. A shame I didn't see that loverly sun outside today :(..

The machine I'm migrating from is an older FreeBSD box; I spent the last week or two trying to decide between migrating to a Mac Mini instead of an intel box, but decided I'd rather be able to just copy over all my custom code and scripts and have it Just Work, rather than rebuild all the code as well as the hardware.. and really, a Mac Mini isn't as well suited to being the server I need (on the cheap :) As such, I'm just building it into a newly updated FreeBSD box (not even OpenBSD or the like, as I'm most familiar with FreeBSD, so this ought to minimize migration suffering.)

FreeBSD Migration Suffering

Ought to, anyway, but alas.. it did not :) The FreeBSD guys are normally pretty on top of their game, but they blew a couple critical things during the straight installation path (normally I do upgrades over time, but this was a full install to a newly built box..) -- there were a few hiccups that I was gong to ignore, but once I got to the Very Aggravating Annoying I decided to try and jot down some of the other ones that came to mind since I was so darned irritated :)

OKay, so thats my rant list from memory. Overall it was the same install process as years ago, so no biggy, but that cD swapping drove me nutty.

How to migrate between machines..

The next trick is how to actually copy piles of data; the old machine was exactly that.. old, and with some crippled/broken hardware no less. (IDE bus was shot, for instance.) So burning CDs from it - out, tar/zipping up the data - out (not enough disk space to compress larger directories to), and so on. In the end I figured out a couple good methods (I think, we'll see when I'm done :)

Heres your script snippets:

Compress a directory ('from cwd') to a cpio file:

find . -depth  | cpio --create > /usr/tmp/mypath.cpio

Extract from a cpio file:

cpio --extract < /usr/tmp/mypath.cpio

cpio'ing on source box, sending across ssh and extracting on the other:

find . -depth -print | cpio -oaV | ssh user@my-ip 'cpio -imVd'

Oh baby!

[ Category: / technology / bsd ] [link] [Comments]