* [Qemu-devel] resize an image
@ 2005-08-12 6:56 MichaelHoeller
2005-08-12 15:35 ` Jim C. Brown
0 siblings, 1 reply; 3+ messages in thread
From: MichaelHoeller @ 2005-08-12 6:56 UTC (permalink / raw)
To: qemu-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] resize an image
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
0 siblings, 1 reply; 3+ messages in thread
From: Jim C. Brown @ 2005-08-12 15:35 UTC (permalink / raw)
To: qemu-devel
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.
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.
--
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] resize an image
2005-08-12 15:35 ` Jim C. Brown
@ 2005-08-12 16:15 ` Paul Brook
0 siblings, 0 replies; 3+ messages in thread
From: Paul Brook @ 2005-08-12 16:15 UTC (permalink / raw)
To: qemu-devel; +Cc: Jim C. Brown
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-08-12 16:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.