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

xen-users

[Top] [All Lists]

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

To: Jonathan Ervine <JErvine@xxxxxxxxxx>
Subject: Re: [Xen-users] shrink or grow disk image?
From: John Haxby <john.haxby@xxxxxxxxxx>
Date: 2008年4月30日 12:06:33 +0100
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: 2008年4月30日 04:07:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4818358E.8030004@xxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <1209496880.29921.59.camel@xxxxxxxxxxxxxxxxxxxxxxxx> <200804301025.23379.jervine@xxxxxxxxxx> <4818358E.8030004@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.12 (X11/20080226)
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.
jch
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: Re: Re: [Xen-users] tap:aio not working... , Gernot Kieseritzky
Next by Date: Re: [Xen-users] xm restore & HVM -> invalid device model signature read , Gernot Kieseritzky
Previous by Thread: Re: [Xen-users] shrink or grow disk image? , John Haxby
Next by Thread: [Xen-users] How can you tell if NUMA is turned on in the Hypervisor? , Jeff Lane
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /