On Tue, Jun 12, 2007 at 04:35:45PM +0100, Luciano Rocha wrote:
> On Tue, Jun 12, 2007 at 10:24:37AM -0500, James Wilson wrote:
> > Yes I am creating it as a 7GB file.
>
> Well, I can only thinkt to try a bigger file.
> perl -e 'truncate("file", 8.*1024.*1024.*1024.)' will extend it to 8GB.
Urm, the 'truncate' function is only valid for making files *smaller*.
Check the docs, in particular the last line....
truncate FILEHANDLE,LENGTH
truncate EXPR,LENGTH
Truncates the file opened on FILEHANDLE, or named by EXPR, to the
specified length. Produces a fatal error if truncate isnâ??t imple-
mented on your system. Returns true if successful, the undefined
value otherwise.
The behavior is undefined if LENGTH is greater than the length of the
file.
What you actually want to do to reliably grow a file while preserving its
data is to 'seek' to the larger size. There's no need to use Perl - dd
is happy doing it
dd if=/dev/zero of=file.img bs=1 count=0 seek=8G
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
|