sparse files
Mike Reinehr
cmr
Wed May 25 09:42:32 PDT 2005
On Wednesday 25 May 2005 12:37 am, Roger Oberholtzer wrote:
> > I'm wondering now, if the answer to your problem is to use a tool such as
> > gzip or bzip2 to create a compressed archive of your qemu file, rather
> > than tar.
>
> I think if I use bzip or such tool, the 6GB will be compressed and
> recreated on the destination. This means that the copy will no longer be
> sparse.
>
> I can deal with this if it is not expected to work. But discussions I
> have read imply that it should.
I'm sure that you're right.
In the mean time you might find this interesting, if not helpfull. This comes
from the AIX Version 4.3 Commands Reference, Volume 5, First Edition (October
1997), so it's not exactly current and may not be relevant, but the page on
the tar command contains this:
Note:
The tar command is not enabled for files greater than 2 Gig in size due to
limitations imposed by XPG/4 and POSIX.2 standards.
Tar does not preserve the sparse nature of any file that is sparsely
allocated. Any file that was originally sparse before the restoration will
have all space allocated within the filesystem for the size of the file.
http://www.unet.univie.ac.at/aix/cmds/aixcmds5/tar.htm
Later, I came across the tar man page for AIX Version 5.2 with the following:
Notes:
The ustar header format allows for file sizes to be as large as 8 GB.
Therefore, the tar command is enabled to archive files of up to 8 GB in size.
Tar does not preserve the sparse nature of any file that is sparsely
allocated. Any file that was originally sparse before the restoration will
have all space allocated within the filesystem for the size of the file.
http://publib16.boulder.ibm.com/pseries/en_US/cmds/aixcmds5/tar.htm
So, we still don't have an answer to your 2GB file size limitation, but I
think it's clear that tar does not preserve the sparse nature of a file when
restoring.
Sorry! :-(
cmr
--
Debian 'Sarge': Registered Linux User #241964
"More laws, less justice." -- Marcus Tullius Ciceroca, 42 BC
More information about the Linux-users
mailing list