Quantcast
Channel: How can I re-install live production server with minimal downtime? - Server Fault
Viewing all articles
Browse latest Browse all 2

How can I re-install live production server with minimal downtime?

$
0
0

I need to reinstall Ubuntu Server running on VMWare VPS. The simplest way would certainly be to make a fresh install from mini ISO. But it's a production server and I can't afford an hour or more of downtime. Is it possible to reinstall with almost no downtime (say, 15 minutes or so)?

In other words, I'm looking for a way to upgrade OS release on live Ubuntu Server without noticeable downtime. I will transfer all settings and data manually.

Server facts:

  • Ubuntu Server 10.04.2 LTS amd64
  • VMWare VPS with console access (I can mount a local ISO image)
  • Single drive:
    • /boot, 92 MB on sda1 @ext4
    • /, 1.5 GB on LVM root @ext4
    • /srv, 19 GB on LVM data @ext4
    • swap on LVM swap

I have no experience with Linux file system tools (chroot and the like) yet. However, I guess a plan of action similar to the following might work (host is target VPS machine, upgrade is new OS):

  1. Install upgrade OS

    Install a fresh Ubuntu Server on local Virtual Box.

  2. Transfer services and settings

    Transfer services and settings from current OS to upgrade OS. I keep config as portable as possible and use etckeeper to track configuration changes.

  3. Copy upgrade OS file system to host

    I plan to use rsync to copy upgrade OS file system to host. But where to place it on host? I thought of:

    • a separate partition; I'd need to shrink LVM data on host and prepare new partition for the upgrade OS file system.

    • a file image; I'd create a file image on host's /srv partition, mount it on host (don't know how to yet) and copy upgrade OS file system into it.

    • a folder; I'd transfer mirror into folder on host's /srv partition. This would be the best option IMO, if at all possible.

  4. Replace current OS with upgrade OS file system

    I'm aware it depends on where the mirror has been transfered to. In any case it should be possible to switch first to test it working and replace file systems afterwards. I can afford to reboot and use recovery console or boot mini ISO for that.

Steps 3 and 4 are main question marks on which I need instructions. If you can advice changes to my 'plan' or a different approach, please, go ahead. Reference to instructions or documentation would be appreciated.

Edit: As suggested I'd go with a clone machine if I there's no other solution.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images