All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: "Jim C. Brown" <jma5@umd.edu>
Subject: Re: [Qemu-devel] resize an image
Date: Fri, 12 Aug 2005 17:15:16 +0100	[thread overview]
Message-ID: <200508121715.18244.paul@codesourcery.com> (raw)
In-Reply-To: <20050812153542.GA1502@jbrown.mylinuxbox.org>

On Friday 12 August 2005 16:35, Jim C. Brown wrote:
> On Fri, Aug 12, 2005 at 08:56:24AM +0200, MichaelHoeller@t-online.de wrote:
> > Hello,
> >
> > I did create some time ago an 2GB image via dd. Now I have to realize
> > that I on ly ndeed 1,1 GB is there a way to shrink the sizes of my
> > image?
> >
> > Thanks a lot
> > Michael
>
> This is unusual. Most people ask if they can enlarge them.
>
> The easy way, if you are using raw format, is just to use dd to make the
> smaller sized file and then fix the partition table. A defrag might be
> helpful.

Probably a good idea to shrink the partition _before_ you shrink the image and 
discard all the data in that half of the disk :-)

> The hard way is to make a new blank disk image of the right size, and then
> to create the partition table and file systems in the new disk image, and
> then copy everything over.

I'd argue this is actually the easy way.  It's certainly much safer than 
trying to resize partitions in place. You can pass both images to qemu (using 
-hdb), use conventional migration tools within the guest, then just switch 
the images.

Paul

      reply	other threads:[~2005-08-12 16:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-12  6:56 [Qemu-devel] resize an image MichaelHoeller
2005-08-12 15:35 ` Jim C. Brown
2005-08-12 16:15   ` Paul Brook [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200508121715.18244.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=jma5@umd.edu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.