Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Apr 23, 2007 9:27 am 
Offline
Senior Member

Joined: Wed Sep 17, 2003 7:39 pm
Posts: 124
I recently wanted to perform a clean upgrade to Debian 4.0 with minimal downtime. I did this by renting a second Linode (call it Linode B), configuring my Debian image there (call it disk 'src'), and copying it over to my main Linode as a bootable disk image (call it Linode A). Here's an expansion on anderiv's information to guide anyone else wanting to do this. YMMV.

Starting with Linode B..

1. Once you've completed work on 'src' on Linode B, check the amount of disk space in use on it and shut down the Linode.
2. Resize the disk image based on how much space is in use (eg. if you have used 200MB, resize it to 220MB). When the copying takes place, the entire disk image is copied rather than just the useful data, so this will save time.
3. Create a new Finnix profile on Linode B using the information in caker's thread here.
4. Assign /dev/ubdb to your 'src' disk image by editing the Finnix profile.
5. Boot Linode B into Finnix and log into it using Lish (SSH into your hostXX.linode.com machine with your Linode.com credentials, and hit enter to get into the screen session).

Moving onto Linode A..

6. Log into the web interface and create a new disk image on Linode A - it should be ext3 and the same size as the 'src' image in step 2.
7. Assign the disk image to /dev/ubdh (or whichever device is free) in your profile on Linode A.
8. Reboot Linode A.

Back to Linode B..

9. In your Finnix session, enter the following command:
Code:
dd if=/dev/ubdb | ssh -p 22 -c blowfish root@linodeA dd of=/dev/ubdh

Replace the SSH port if Linode A's SSH runs on something other than 22 and be sure to replace 'linodeA' with Linode A's real IP address. Also replace /dev/ubdh if you did not use it in step 7 - triple check this to ensure you do not overwrite the wrong disk image.
10. Play some UT2004 whilst waiting for this to complete - in my case transferring between two hosts at Atlanta took place at a surprisingly slow 400k/sec. Obviously the speed is not too important as there is no downtime whilst this process is taking place, but you can monitor the speed anyway using iftop.

Back to Linode A..

11. Once complete your disk image should now be accessible from Linode A:
Code:
mkdir /mnt/newimage
mount /dev/ubdh /mnt/newimage
ls -al /mnt/newimage

12. At this point you may want to make some changes to your new image to ensure that it is bootable. I modified /etc/network/interfaces to reflect the IPs of Linode A (I use static addressing) and also /etc/hostname. This is also a good time to transfer data to the new image.
13. You can then go ahead and use this disk image in a new configuration profile on Linode A, or simply change your current profile to use the new image.

I'm sure there are improvements that can be made to this process, but it worked like a charm for me and I hope it helps others :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group