FreeBSD, Compact Flash, ZFS, and minimum root partition size

The day I booted a FreeBSD system off Compact Flash I was hooked. CF is an extremely robust storage medium with no moving parts. CF cards have emerged completely intact from washing machines, clothes dryers, and impacts that would destroy any spinning disk. After setting up a system to boot from CF, I am confident that henceforth and forevermore, that system will have a functional boot disk.

I’ve stuck CF cards and USB thumb drives into servers in our data centers, our server room at the office, and my server closet. The practice has served me quite well but that is not to say that CF is perfect. Write speed is slow. There is a finite number of write cycles each block can endure. Some CF cards claim DMA support but don’t support it well enough to be useful. Some server boards do not include internal IDE or USB ports. But everywhere else, we use CF.

Because of CF write limits, I always mount the root partition read-only. Files on the / partition are not frequently altered so this rarely causes any inconvenience. We recently built a 6.7 terabyte storage array at work using a HP 320S chassis, a pile of disks, and ZFS. ZFS volumes aren’t bootable in FreeBSD but we had already installed a USB thumb drive as the boot partition.

After working with ZFS, I decided that gmirror was no longer sufficient for my personal file server. It needed ZFS, which meant upgrading to FreeBSD 7. This server has been running off a 256MB CF card for years. The CF card is so old it was actually made in the USA! While upgrading to 7.0 I ran into a snag, the FreeBSD kernel (and modules) now use over 100MB. That means 256MB is no longer enough space for the new kernel and the old one to both fit.

Texas Michigan driving stats

One way mileage: 1,290 (Garland to Cadillac)
Total miles driven: 3,294
Total gallons of gas: 129
Avg. price per gallon: $2.94
Total gasoline purchases: $380.40
Gas stops for Odyssey: 4 (one per state: AR, MO, IN, MI)

Travel Cost for 4 persons Cost Time (1 way)

NOTES:
Flight costs include auto rental ($300) and airport parking ($84).
Flight times include drive to airport (1 hr), checkin and security (2 hr), rental car pickup and drive from GRR to Cadillac (2 hr).

Flight, direct ($300 ea) $1,584 7 hrs
Flight, 1 hop ($200 ea) $1,184 9 hrs
Auto – Honda Odyssey (fuel) $300 16 hrs

On the drive to Michigan, we hit snow in Lansing and saw almost a dozen cars in the ditches on I-96. The GRR airport was already shut down so if we had flown, we’d have been diverted to another airport and stranded with many other holiday travelers.

During our stay, I made a day trip from Cadillac to Lansing, hitting snow near G.R. on the way down. The entire return trip was in near whiteout conditions. Cadillac gained 8 inches of snow during my half-day absence. Kayla now confidently asserts that if it is snowing, we’re in Michigan.

The return to Texas was similarly exciting. When we left Michigan at 8 PM, a winter storm was in progress and the temperature had plummeted. The traffic grooves within each lane of the freeway had iced over. For those daring enough to drive “in their lane,” the roads were treacherous. We saw two tractor trailers, an Indiana police cruiser, and an assortment of other vehicles inadvertently parked in the snow filled ditches along the highway. Progress was slow but once past Indianapolis, the ice was gone and the roads cleared up. We drove through the night while the kids slept, arriving around 2 PM.

It is easy to imagine that flying would have been better. But both flights would have been delayed, erasing the time benefits. And when flying, we are separated from our luggage, making it onerous to placate travel weary companions. Driving was definitely the right choice.