Red Hat Bugzilla – Bug 801658
rebalance does not truncate the files in source machine.
Last modified: 2016-05-31 21:55:42 EDT
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):
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.
After rebalance size (du -sh) was 508Mb and 538MB respectively.
Files in source brick should get truncated.
CHANGE: http://review.gluster.com/2905 (cluster/dht: Replace ftruncate call with truncate in rebalance) merged in master by Vijay Bellur (email@example.com)
Now data in source machine is getting truncated. Moving to verified.