Switch distros without downtime?

Hey. I recently migrated from a Linode 160 to a 320. I no longer have problems with things being slow, running out of RAM, tc. The migration was great, and everything is working great.

However, I want to switch distributions. My current Gentoo image has run into some trouble. If I try to upgrade MySQL or PHP I'll be in for a lot of downtime. I also want to try to switch from apache2 to lighttpd. Is there a way I can do this without significant downtime?

What I'd like to do is setup the new server without bringing the current one down. Then just copy the databases over and move the DNS records. To do this I might have to pay for two nodes at once, that's not really a good option money-wise.

Does anyone have a good solution for me? If not, should I just suck it up and deal with downtime? Or maybe I should just let things be as they are.

6 Replies

@Apreche:

Hey. I recently migrated from a Linode 160 to a 320. I no longer have problems with things being slow, running out of RAM, tc. The migration was great, and everything is working great.

However, I want to switch distributions. My current Gentoo image has run into some trouble. If I try to upgrade MySQL or PHP I'll be in for a lot of downtime. I also want to try to switch from apache2 to lighttpd. Is there a way I can do this without significant downtime?

What I'd like to do is setup the new server without bringing the current one down. Then just copy the databases over and move the DNS records. To do this I might have to pay for two nodes at once, that's not really a good option money-wise.

Does anyone have a good solution for me? If not, should I just suck it up and deal with downtime? Or maybe I should just let things be as they are.

Use a second disk image with the other dist on it, then you can mount it and work on it while the old dist is still runing.

You'll still probably do a lot of booting between them, but this way you'll keep the downtime to a minimun without having to pay for a second linode.

You can chroot into the other disk image to prepare it while still running your current one.

how will I know which device to mount and chroot?

When editing your configuration you'll map a new disk image on a device (/dev/ubd[a-h]). Then you can reboot your linode with the updated configuration, partition the now available device, format whatever partition you want to use, then mount it and follow the usual Gentoo chroot install procedure.

@Apreche:

However, I want to switch distributions. My current Gentoo image has run into some trouble. If I try to upgrade MySQL or PHP I'll be in for a lot of downtime. I also want to try to switch from apache2 to lighttpd. Is there a way I can do this without significant downtime?

For what it's worth, you shouldn't have any significant downtime at all. You can emerge any package while it's still being used, and then restart it when it's done. There should be no problem with that.

@Ciaran:

@Apreche:

However, I want to switch distributions. My current Gentoo image has run into some trouble. If I try to upgrade MySQL or PHP I'll be in for a lot of downtime. I also want to try to switch from apache2 to lighttpd. Is there a way I can do this without significant downtime?

For what it's worth, you shouldn't have any significant downtime at all. You can emerge any package while it's still being used, and then restart it when it's done. There should be no problem with that.
Usually that's the case. The problem is that there is a lot involved when upgrading to MySQL 5. Also, upgrading MySQL 5 has this huge dependency web including PHP5 and such. I'd have to reconfigure Apache to work with PHP4 and 5 simultaneously (ug) because some of our programs demand to still use 4. I'd also have to backup and reload all the databases. It really wont be pleasant. I dont' even want to think about what will happen if something doesn't merge properly.

Also, I'm thinking about switching from Gentoo to Ubuntu. If it was Gentoo to a new Gentoo it would be a piece of cake with the chroot.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct