WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] shrink or grow disk image?

On Wed, 2008-04-30 at 12:06 +0100, John Haxby wrote:
> John Haxby wrote:
> > Of course, if your original file is sparse then shrinking isn't going 
> > to actually free disk space but as you've just copied it (using, 
> > presumably, cp) then you've filled all the holes with zeroes.   If you 
> > copy the file with tar and the --sparse options then the holes won't 
> > get filled in and you won't be using space that you don't need.  I 
> > suspect, though I haven't tried it, that copying a file with lots of 
> > zero-filled blocks using tar --sparse will convert those blocks into 
> > holes.  Does that help?
> 
> On Fedora 8, at least, cp handles sparse files quite nicely and "cp 
> --sparse=always" seems to do a good job of turning blocks of zeros into 
> holes.
> 
> You learn something new every day.

I'm playing around with the suggestions. Thanks everyone!

James


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>