Hi,
I didn't even realize tar could do anything special for sparse files
until you pointed it out. It turns out that it compares the number of
blocks reported by stat() to the file size to see if the file is taking
up less space on disk than expected. If so, it simply scans the file
for blocks that are all zero in order to find the holes.
As you noticed, PVFS does store data sparsely. We don't bother filling
in gaps in the stripe pattern across servers, and then each server also
benefits from whatever sparse file behavior the underlying file system
provides.
Unfortunately, though, PVFS doesn't have a way to report this back to
stat(). PVFS isn't really block based at all; it just calculates the
block count for stat() on demand at the client based on how many blocks
a file of that size might take up.
I don't think there is any straightforward way to make PVFS report this
information.
-Phil
Bike & Snow wrote:
Hello
I am currently testing PVFS version 2.8.1.
I found installation very simple and I now have a single server and a
single client for testing.
One of my requirements is that sparse files are handled properly. We
use these for virtual machine images.
I've found that the writing of sparse files is handled correctly. For
example, I use the QEMU image create tool:
qemu-img create test.img 5G
That will create an raw image of 5G size.
I have verified that the space is not being fully allocated on the
PVFS server. So the writing of the file is being handled correctly.
However, reads are not handled correctly on the client.
For example, the "du" command can not calculate the actual disk space used.
Tar does not see the sparse bit of the file either when running with
the -S option.
Is this a limitation of PVFS or can I configure it to handle sparse
files properly.
Thank you.
_______________________________________________
Pvfs2-users mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users
_______________________________________________
Pvfs2-users mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users