Golden Disk Image Assistance

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!

2 Replies

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.

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.

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