FreeBSD running on CF card
angelo | December 6, 2007
My firewall/asterisk/mail scanner is a Compaq Deskpro EN/SFF, a very small Pentium III 500 box, with 256MB RAM and a 13GB ATA disk. I am very happy with it, since it scans inbound and outbound email all day using amavisd-new, spamassassin and ClamAV, and at the same time I can call through asterisk without a glitch. And it also runs OpenVPN server, DHCP server, BIND, NTP daemon, IPv6 tunnel, PF firewall with QoS, etc. And all that with only 30W power consumption! On auction sites, they go for around 25-30 EUR a piece. You don’t get a Cisco router with that flexibility and features for that price
The thing that annoyed me, was the fact that the disk made an annoying high-pitch sound. I could replace it with another drive, perhaps a 2.5″ laptop harddisk, to reduce the noise, but eventually, I decided to go for a CF-card. The CF thing was kind of new to me, but after reading for a while, it looks like the CF card with an adapter just shows up as an IDE disk, and that’s it, bootable and all.So I went out and bought a CF to IDE adapter and an 8GB Sandisk CompactFlash Extreme III card. The adapter is quite cool, you can mount it in a floppy bay, or you can mount it at the back of you PC between the PCI slots, so you can just eject the card from the back or the front. (Well, looking up the product I bought on John’s site reveals more similar adapters to me, I think afterwards this adapter would have been cheaper, even though I’m not sure if it would fit in the small form factor PC.)
I installed the card, and after some fiddling with cables and jumpers, FreeBSD saw it as my second disk. I then stopped all network services, created a new slice on it and created partitions/labels with sysinstall. I then did a dump/restore to copy the partitions from the old disk to the new disk. After that was done (took quite a while, played some CoD4 while waiting), I rebooted the machine using only the CF card, fixed the missing /tmp filesystem, and rebooted again, and that’s it, the machine was op and running again! The only way to tell it’s running is the light on the front of the machine, because it’s now dead silent
And the performance is not as bad as I thought. I used diskinfo to do some simple and naive tests. The old disk (12407MB <Maxtor 91301U3 FA570480> at ata0-master UDMA33) has seeks time of up to 22ms, and a tranfer rate of up to 24MB/s. The new disk (7815MB <SanDisk SDCFX3-8192 HDX 4.03> at ata1-master WDMA2) had seek times of under 0.5ms, and a steady transfer rate of 15MB/s. The CF card feels fast and snappy as well, probably because of the low seek times..





