Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Oct 02, 2013 4:31 pm 
Offline
Newbie

Joined: Wed Oct 02, 2013 2:53 pm
Posts: 2
Hello,

I'm looking to create a golden disk image according to this article: https://library.linode.com/server-builds

Of the "storage options" listed I'd like to use is "Different Computer".

I tried copying the image over SSH (https://library.linode.com/migration/ssh-copy), which works. What I didn't realize is that it copies the entire image, not just files, which ended up being 50GB. Which isn't optimal for uploading to another Linode obviously.

So I think I know my next steps in order to make the image smaller. Can you confirm I'm thinking right?

1. Resize the main disk image (/dev/xvda) from 48640MB to the roughly the space used - currently it reports with "df -h" that I've used 1.9GB. So I'm thinking resize it to 2.5GB.
2. Download the image.
3. Resize the main image back to 48640MB

Now the steps for a new Linode to use that image would be:

1. Create Linode with the main image being the same size as my source image (2.5GB)
2. Write my saved disk image to the new Linode at (/dev/xvda) over SSH in rescue mode
3. Resize /dev/xvda to the desired size, probaly 48640MB

One other thing I'm unsure about is configuration profiles. The image I'd like to save and use for future instances is based on Linode's current CentOS 6.2 profile. If in the future I setup a new Linode that's based on a CentOS 6.4 configuration, how will that effect the image I have saved to re-use?

Thanks!


Top
   
PostPosted: Thu Oct 03, 2013 10:19 am 
Offline
Newbie

Joined: Wed Oct 02, 2013 2:53 pm
Posts: 2
Good news this worked perfectly. It takes a bit of time to download then re-upload to a new linode instance - maybe about 3 hours. But it's certainly better than setting everything up from scratch each time I need a new instance.


Top
   
PostPosted: Thu Oct 03, 2013 11:05 am 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
You can speed up the transfer by piping through compression tools like bzip2, or to help avoid being CPU bound on the sending end, pbzip (multithreaded bzip2). If you're doing that, you can also speed up the transfer by overwriting the disk's free space with zeroes before the transfer, by copying /dev/zero into a new file targeted to use up almost all your free space and then deleting it; blocks that are filled with zeroes will compress far better than blocks filled with old random garbage.


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


Who is online

Users browsing this forum: No registered users and 4 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