Load Linux/FreeBSD from Compact Flash

Vibe

Verified User
Joined
Aug 3, 2005
Messages
124
Hi everyone,

Recently I have been thinking about alternative options for setting up new servers. One idea I have been researching is the idea of booting the OS from Compact Flash Cards using a PCI addon card (which can be configured for Raid1), while using a Raid1 SATA drive array for user data. Freebsd.org has an interesting guide with regard to embedded systems (http://www.freebsd.org/doc/en/articles/solid-state/index.html), and I've seen the same can be done for Linux.

From a practicality standpoint this would make server setups a breeze (once the process is "refined") - copy the main install image to multiple CF cards (after fully configured with DA, Apache, MySQL etc). Keep copies of the CF cards on hand in case of emergencies or a need to setup a server quickly. When necessary, update the current "revision" of your CF installs and plug new ones into each machine as needed.

Due to the limited number of writes that CF cards can handle, it is typically suggested that they be mounted read-only with /var and /tmp configured as filesystems in system memory. However, this wouldn't work from a hosting standpoint as logs would disappear after reboot, as would cron tabs. With this in mind I would *think* that moving /var to a separate partition on the Raid1 SATA array would provide a solution. With memory being so cheap as well as the compact flash limited writes issue, it is also suggested to forego /swap completely.

Now the big question - is this type of install realistic? Am I barking up the wrong tree?

I have seen a couple of commercial systems like this that were implemented as file servers - why not take this to the next level and implement a web server?

I know CF read/writes are certainly not as fast as a SATA disk, but if you don't plan to reboot often (hopefully not!) I would think that this type of setup could be accomplished successfully.

Any thoughts?
 
Let's just say you're entering a brave new world.

You write:
I know CF read/writes are certainly not as fast as a SATA disk
I don't know that, but for the sake of discussion I'll presume you do.

Many daemons load additional copies of themselves running as either the root user or some unprivileged user, in the course of webserving. For example, directadmin, apache, exim.

So presuming you're right, this would be slower.

Back in the old days when sysadmins were gods who controlled their users with an iron hand, the only accepted partitions for dynamic files were /var and /home, and other directories were on read-only partitions, often shareable over a local network.

If you had writable data anywhere else you created symbolic links to directories inside of /var.

However, our DirectAdmin systems have writable files in other places, such as

/usr/local/directadmin

and /etc/virtual

and of course /etc/named.conf (and perhaps others) in /etc

I'd recommend that instead you create a complete system on a thumb drive, boot the new bare-metal server somehow (CD? A different thumb drive?) and copy everything from the thumb drive to your SATA RAID1 array.

If you install new systems often enough so that the time saved is worthwhile.

Jeff
 
Hi Jeff,

Thanks so much for your input - I had a feeling that I may jetting into space with a half a tank of gas.

This "brain-storm" got started when a partner and I were talking about a clients' old file server. I can't remember the name for the life of me - but the main idea was that it booted off flash memory, and I believe upgrades were performed similar to flashing the bios on a motherboard. I understand that for the most part the machine ran great - until the vendor went out of business. I wish I could remember the name...

My short-sighted thinking overlooked the issue of DA writing to /etc and /usr/local/directadmin - I see where that might be a problem :D.

I didn't realize the admins of lore only allowed dynamic files on /var and /home - that's very interesting, and I can see where that can be beneficial (Reminds me of my other partner, an IT Viking of sorts when it comes to clients).

I think I may have to return to home base and rethink a bit. We don't have the need to install new systems that often (our last server count can be done on one hand...well, maybe a few fingers ;)).

I may have to pull out a test box to tinker...it would definitely be an interesting option, if feasible - who knows.

Thanks again Jeff and best wishes! - Michael.
 
Back
Top