[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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!


Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.