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. Thanks, Glen _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Daniel P. Berrange
2006-Dec-08 15:31 UTC
Re: [Xen-users] Any way to increase a sparse file disk?
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@lists.xensource.com http://lists.xensource.com/xen-users
Nico Kadel-Garcia
2006-Dec-08 15:37 UTC
Re: [Xen-users] Any way to increase a sparse file disk?
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. > > > Thanks, > GlenBesides tarballing the data up, storing it elsewhare, then deleting the partition, rebuilding it, and putting the data back on it? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 12/8/06, Glen Davis <gldavis@novell.com> 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. > Thanks, > GlenDan''s suggestion has worked for me, there are more specific directions here if you need: http://jailtime.org/howto:filesystem -Tim _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users