Bug 801658

Summary: rebalance does not truncate the files in source machine.
Product: [Community] GlusterFS Reporter: M S Vishwanath Bhat <vbhat>
Component: unclassifiedAssignee: shishir gowda <sgowda>
Status: CLOSED CURRENTRELEASE QA Contact: M S Vishwanath Bhat <vbhat>
Severity: medium Docs Contact:
Priority: unspecified    
Version: pre-releaseCC: gluster-bugs, mzywusko, nsathyan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 18:04:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 817967    

Description M S Vishwanath Bhat 2012-03-09 05:53:04 UTC
Description of problem:
After rebalance files in source brick is not getting truncated.

Had a 1 node distribute machine. Created the data on the mountpoint i.e. untarred the linux kernel. So on the back-end the size was 579MB. Now I add one more brick and start rebalance. After rebalance completed the size of the source brick was 508MB and size of the dest brick (newly added brick) was 538MB. So the files in source machine is not getting truncated.

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

How reproducible:
2/2

Steps to Reproduce:
1. Create a single node dist volume.
2. Untar the Linux kernel on the mountpoint.
3. Check the size in the back end export brick (579MB)
4. Add one more brick and run rebalance.
5. After rebalance completed chekc the size in both the back-end export bricks.
  
Actual results:
After rebalance size (du -sh) was 508Mb and 538MB respectively. 


Expected results:
Files in source brick should get truncated.

Additional info:

Comment 1 Anand Avati 2012-03-10 06:38:29 UTC
CHANGE: http://review.gluster.com/2905 (cluster/dht: Replace ftruncate call with truncate in rebalance) merged in master by Vijay Bellur (vijay)

Comment 2 M S Vishwanath Bhat 2012-05-31 07:38:31 UTC
Now data in source machine is getting truncated. Moving to verified.