Bug 1256580 - sharding - VM image size as seen from the mount keeps growing beyond configured size on a sharded volume
Summary: sharding - VM image size as seen from the mount keeps growing beyond configur...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: sharding
Version: mainline
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Krutika Dhananjay
QA Contact: bugs@gluster.org
URL:
Whiteboard:
Depends On:
Blocks: 1257204
TreeView+ depends on / blocked
 
Reported: 2015-08-25 03:58 UTC by Krutika Dhananjay
Modified: 2016-06-16 13:33 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1257204 (view as bug list)
Environment:
Last Closed: 2016-06-16 13:33:45 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Krutika Dhananjay 2015-08-25 03:58:03 UTC
Description of problem:

In the virt-store use case, on a sharded volume the size of what is supposed to be a 15G image was observed to have grown to 17G (subsequently 21G) as seen on the mount point, as and when IO was performed within the VM's /home directory,
On inspecting the file copy on the brick(s), the trusted.glusterfs.shard.file-size was found to match the size presented in the ls -lh output on the mount point. This means that something went wrong in the accounting of file size by the sharding translator.
On reading code, I figured this is due to the fact that in inode write fops (particularly writev), shard translator counts the change in size by calculating the difference between the postbuf.ia_size and prebuf.ia_size for each shard where a write() was done, eventually adding up the deltas of all shards that participated in this write and incrementing the size xattr by that amount. But if the writes are on hole regions (which means the participant shard lies somewhere within the actual file size boundary) then there is no need to add its change in size to the size xattr. In other words, the deltas need to be taken into account only for writes that cross the current file size boundary.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Anand Avati 2015-08-26 12:56:36 UTC
REVIEW: http://review.gluster.org/12017 (mgmt/glusterd: Add strict-write-ordering option to CLI) posted (#1) for review on master by Pranith Kumar Karampuri (pkarampu)

Comment 2 Anand Avati 2015-08-26 13:16:11 UTC
REVIEW: http://review.gluster.org/12017 (mgmt/glusterd: Add strict-write-ordering option to cli) posted (#2) for review on master by Krutika Dhananjay (kdhananj)

Comment 3 Anand Avati 2015-08-26 13:16:13 UTC
REVIEW: http://review.gluster.org/12020 (features/shard: Fix size update for writes at hole region) posted (#1) for review on master by Krutika Dhananjay (kdhananj)

Comment 4 Anand Avati 2015-08-26 23:45:49 UTC
REVIEW: http://review.gluster.org/12020 (features/shard: Fix size update for writes at hole region) posted (#2) for review on master by Krutika Dhananjay (kdhananj)

Comment 5 Anand Avati 2015-08-27 09:57:18 UTC
REVIEW: http://review.gluster.org/12020 (features/shard: Fix size update for writes at hole region) posted (#3) for review on master by Krutika Dhananjay (kdhananj)

Comment 6 Anand Avati 2015-08-28 03:36:44 UTC
REVIEW: http://review.gluster.org/12020 (features/shard: Fix size update for writes at hole region) posted (#4) for review on master by Krutika Dhananjay (kdhananj)

Comment 7 Anand Avati 2015-08-30 06:52:08 UTC
COMMIT: http://review.gluster.org/12020 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit d304916ddf3d6848787c3a668cc36e3395b32069
Author: Krutika Dhananjay <kdhananj>
Date:   Wed Aug 26 09:27:42 2015 +0530

    features/shard: Fix size update for writes at hole region
    
    Change-Id: Iceccef8f3f466c7ffb9991f8eb248b81e7b80efb
    BUG: 1256580
    Signed-off-by: Krutika Dhananjay <kdhananj>
    Reviewed-on: http://review.gluster.org/12020
    Tested-by: NetBSD Build System <jenkins.org>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 8 Nagaprasad Sathyanarayana 2015-10-25 15:01:44 UTC
Fix for this BZ is already present in a GlusterFS release. You can find clone of this BZ, fixed in a GlusterFS release and closed. Hence closing this mainline BZ as well.

Comment 9 Niels de Vos 2016-06-16 13:33:45 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


Note You need to log in before you can comment on or make changes to this bug.