Log in

No account? Create an account

LVM, chroot and mount --rbind are inordinately useful together - Journal of Omnifarious

Nov. 11th, 2006

12:39 am - LVM, chroot and mount --rbind are inordinately useful together

Previous Entry Share Next Entry

I put Fedora Core 6 on my main server that handles mailing lists, Subversion repositories, my main website, Mercurial repositories, a trac instance, the CAKE website, my personal email, etc.... About the only thing it doesn't handle is DNS.

So, that means there's a lot to get working after an upgrade. I never trust the distribution's 'upgrade' process to actually do a decent job of migrating the configurations, so I did a fresh install into a new LVM partition. Now I'm using chroot to open up a new gnome-terminal that acts as if it's running under the new system already. And I'm slowly getting everything set back up again (and checking all kinds of things into version control so its easier next time) by modifying config files then starting the service.

The chrooted gnome-terminal acts like it's running on a single-user-mode system, which makes testing things really easy. But, of course, it's not. I actually have my server running all the old stuff. This is all made possible by using LVM, chroot and mount --rbind (to mount /dev, /home and various other things).

In order to test Apache, I have the server on the new system set up to use different ports (which also happen to be firewalled off) for everything. The last step in making Apache work is going to be changing all the port #'s back. I'm looking into doing a similar thing with Postfix so I can test if it and mailman works on the new system. The trickiest part of that is going to be blocking outgoing test messages.

It's like having a staging computer without having the extra computer. :-)

Current Mood: [mood icon] accomplished