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] Any way to increase a sparse file disk?

To: Glen Davis <gldavis@xxxxxxxxxx>
Subject: Re: [Xen-users] Any way to increase a sparse file disk?
From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Date: Fri, 8 Dec 2006 15:31:05 +0000
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 08 Dec 2006 07:31:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <45791C73.9BD0.0021.0@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: <45791C73.9BD0.0021.0@xxxxxxxxxx>
Reply-to: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
On Fri, Dec 08, 2006 at 08:02:19AM -0700, Glen Davis wrote:
> Anyone know of a way to increase a sparse file disk?  For 
> example I create a 4 gig sparse file, format it with a 
> filesysystem, add some data.  Now I want to go back and 
> increase the size to 8 gig without losing any data. 

Should be able to just use dd to seek to the new end point, eg

   dd if=/dev/zero of=mydisk.img count=0 bs=1 seek=8G

This will just set the end of file pointer to the 8GB mark, without actually
writing any data in the file. Once you've done that, you simply resize the
filesystem within the guest to use the new space.

Take forget to take a backup though, just in case the filesystem resize
isn't happy

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

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

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