Centos vs. Freebsd 6.1 installation travails
So the other week I begin to put together the materiel necessary to build that Asterisk box I've been needing to build—it doesn't seem fit for a company whose motto is “industrial-strength computing” to have no real fancy VoIP/messaging system. This is all a grand experiment and learning experience for me, so I fully expect a few missteps along the way. I'm therefore taking this as an opportunity to make a few mistakes along the way.
Being partial as I am to the *BSD series of Unices, I decide to download the 2 ISOs for FreeBSD 6.1, burn them to CD and begin to install.
I must give an aside about the hardware. I'm trying to build this machine on the cheap, but I do want to have it follow at least some notion of “best practices”. Anything that is remotely server-like gets two disk drives in a RAID1 array, disk drives being the #1 thing in my experience to up and fail on you (#2 being power supplies and #3 being—of all things—ethernet cards!). I notice that the local Best Buy has eMachines (yeah, I know, low-end consumer grade stuff? But I've had only good experiences with eMachines to date, and the cost of being wrong here is only about $400) on sale, and 160GB disk drives too, so I walk into the one in Staten Island, plunk down my credit card, and come out with a new eMachines T3418, a spare 160GB drive (to sort-of match the one in there), and another 17" monitor. (You have to buy the monitor in order to get the rebate, but the monitor on my sons' computer is about 10 years old and due to die, and it was basically free after rebate, so why not?)
I get home, and a few days later I manage to unpack the beastie, put the second drive in the machine (drive cages with thumbscrews are a wonder, second only to completely screwless drive cages), hook it up to a little 2-port KVM that I have on the second desk, and give it a whirl.
(I feel like I'm channeling the spirit of another, somewhat more famous Jerry here, at least partly in style. However, should I begin to refer to my little 12' x12' square office as “fractal manor”, feel free to slap me.)
But I digress.
So now I've got a machine that, were I to do nothing, boots up fine with Windows XP Home in it, and a spare drive that is ever so slightly smaller than the main drive. None of this for me! I'm purifying my machine by putting on something holy and good. In goes the CD-ROM.
Now FreeBSD's installer hasn't seen huge improvements since...well...since I started using it back in the 4.x days. I know the old text-mode installer pretty well, and I start to wend my way through it. I try to partition the first hard drive, find out that there's apparently no way (via the installer) to configure the second drive at boot time, so I won't be RAIDing the disks from the outset; I'll partition the drives as identically as I can and build the RAID afterwards.
I knew something was going to be a problem when the CD-ROMs—I had to make several burns of disk 1—gave persistent errors in installation. I tried installing on the master drive. I tried installing on the slave drive. (Bootloaders don't have much a problem with that, really.) In no way could I get an install that would reliably boot at all. Booting would proceed, and then hang in the same (unrecorded; hey it was about 0100 EDT at the time) place every time.
When something like this happens, of course I begin to think that maybe it's something I've done horribly wrong (because it usualyl is), so I figure maybe it's a weird hardware thing because of the second disk. One way to confirm that would be to slap in an ol' reliable Centos 4.0 distro installer disk. Lo! And behold! Installation proceeds painlessly. The disk partitioning system, as painful as it can be, works as I remember, and I partition the two disks relatively identically (one has a leftover 4 GB partition that I can use for slop space) and combine them into a RAID1. I choose not to use the LVM system, opting instead for the older md system.
Now, it's mostly installed, but the load average on the machine is over 4 while the RAID1 partition for /var (at 140GB roughly) builds “in the background”—the machine is pretty much unusable. Of course, I'm sure I'm doing a few obvious wrong things: for example, the two disks should not be on the same ATA channel, they should be on different ones, so I'm paying for my laziness. However, I'm not setting this up as a performance fileserver: the limits on this machine are going to be from my slow network, or from slow recording of voicemail messages, or something else (most likely), and if I really were interested in performance, I would not be relying on 7200 PATA drives. The machine is only about 60% of the way done mirroring that large partition (still); I'm hoping by tomorrow I can cleanly shut the machine down and not concern myself, install the digium TDM13B card and give it a try. (I also have a new Linksys SPA921 VoIP phone to go along with it.) Unfortunately, I forgot that Verizon won't put the demarc any further in my buliding that 12", so I have to run fresh cabling from the demarc to my office to carry wires for the 3 new lines I have. If this works out, my buddy Mark and I will be able to intercom and not deal with buggy Skype implementations...