[Gluster-devel] [Gluster-users] Fwd: FileSize changing in GlusterNodes

Anand Avati anand.avati at gmail.com
Mon Aug 26 17:07:35 UTC 2013


On Mon, Aug 26, 2013 at 9:40 AM, Vijay Bellur <vbellur at redhat.com> wrote:

> On 08/26/2013 10:04 PM, Anand Avati wrote:
>
>> On Sun, Aug 25, 2013 at 11:23 PM, Vijay Bellur <vbellur at redhat.com
>> <mailto:vbellur at redhat.com>> wrote:
>>
>>     File size as reported on the mount point and the bricks can vary
>>     because of this code snippet in iatt_from_stat():
>>
>>              {
>>                      uint64_t maxblocks;
>>
>>                      maxblocks = (iatt->ia_size + 511) / 512;
>>
>>                      if (iatt->ia_blocks > maxblocks)
>>                              iatt->ia_blocks = maxblocks;
>>              }
>>
>>
>>     This snippet was brought in to improve accounting behaviour for
>>     quota that would fail with disk file systems that perform
>>     speculative pre-allocation.
>>
>>     If this aides only specific use cases, I think we should make the
>>     behaviour configurable.
>>
>>     Thoughts?
>>
>>     -Vijay
>>
>>
>>
>> This is very unlikely the problem. st_blocks field values do not
>> influence md5sum behavior in any way. The file size (st_size) would, but
>> both du -k and the above code snipped only deal with st_blocks.
>>
>
> I was referring to du -k as seen on the bricks and the mount point. I was
> certainly not referring to the md5sum difference.
>
> -Vijay
>

I thought he was comparing du -k between the two bricks (the sentence felt
that way). In any case the above code snippet should do something
meaningful only when the file is still held open. XFS should discard the
extra allocations after close() anyways.



>
>> Bobby, it would help if you can identify the mismatching file and
>> inspect and see what is the difference between the two files?
>>
>> Avati
>>
>>
>>
>>
>>
>>     -------- Original Message --------
>>     Subject:        [Gluster-users] FileSize changing in GlusterNodes
>>     Date:   Wed, 21 Aug 2013 05:35:40 +0000
>>     From:   Bobby Jacob <bobby.jacob at alshaya.com
>>     <mailto:bobby.jacob at alshaya.**com <bobby.jacob at alshaya.com>>>
>>     To: gluster-users at gluster.org <mailto:gluster-users at gluster.**org<gluster-users at gluster.org>
>> >
>>     <gluster-users at gluster.org <mailto:gluster-users at gluster.**org<gluster-users at gluster.org>
>> >>
>>
>>
>>
>>     Hi,
>>
>>     When I upload files into the gluster volume, it replicates all the
>> files
>>     to both gluster nodes. But the file size slightly varies by (4-10KB),
>>     which changes the md5sum of the file.
>>
>>     Command to check file size : du –k *. I’m using glusterFS 3.3.1 with
>>     Centos 6.4
>>
>>     This is creating inconsistency between the files on both the bricks. ?
>>     What is the reason for this changed file size and how can it be
>>     avoided. ?
>>
>>     Thanks & Regards,
>>
>>     *Bobby Jacob*
>>
>>
>>
>>
>>     ______________________________**_________________
>>     Gluster-users mailing list
>>     Gluster-users at gluster.org <mailto:Gluster-users at gluster.**org<Gluster-users at gluster.org>
>> >
>>     http://supercolony.gluster.**org/mailman/listinfo/gluster-**users<http://supercolony.gluster.org/mailman/listinfo/gluster-users>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20130826/52a95aa3/attachment-0001.html>


More information about the Gluster-devel mailing list