[Gluster-devel] Choice of Translator question
Csibra Gergo
gergo at csibra.hu
Fri Dec 28 10:21:17 UTC 2007
Friday, December 28, 2007, 1:05:09 AM, Kevan Benson wrote:
> Gareth Bult wrote:
>> This could be the problem.
>>
>> When I do this on a 1G file, I have 1 file in each stripe partition of size ~ 1G.
>>
>> I don't get (n) files where n=1G/chunk size ... (!)
>>
>> If I did, I could see how it would work .. but I don't ..
>>
>> Are you saying I "definitely should" see files broken down into multiple sub files, or were you assuming this is how it worked?
> That sounds like the striping isn't working
Well, the answer is yes for Gareth and no for Kevan. The stripe
translator works :)
See this:
gergolaptop:/mnt/gluster1# ls -la
összesen 26021
drwxr-xr-x 3 root root 1024 2007-12-28 11:03 .
drwxr-xr-x 17 root root 4096 2007-12-28 10:58 ..
-rw-r--r-- 1 root root 104660992 2007-12-28 11:03 glusterimg1
drwx------ 2 root root 12288 2007-12-03 22:09 lost+found
As you see the glusterimg1 file looks like 1 100MB size, but...
gergolaptop:/mnt/gluster1# du -h glusterimg1
26M glusterimg1
It occupies only 26MB (striped to four pieces)
gergolaptop:/mnt/gluster1# df .
Fájlrendszer 1K-blokk Foglalt Szabad Fo.% Csatl. pont
/mnt/glusterimg1 99150 31668 62362 34% /mnt/gluster1
And you see here too, the disk is only 100MB size, and only 31668 are
occupied (Foglalt means occupied in hungarian, Szabad is free).
All of the striped files are sparse files. Sparse files are occupy
disk space only they use. So if you create a file, seeks to 100MB, and
write there only 1 byte, the file will looks like a 100MB file, but
will only occupy 1 byte (not 1 byte, 1024,2048,4096 it depends the
block and chunk size of the filesystem).
see more here:
http://en.wikipedia.org/wiki/Sparse_file
--
Best regards,
Csibra Gergo mailto:gergo at csibra.hu
More information about the Gluster-devel
mailing list