summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2014-01-17 16:45:55 +0530
committerVijay Bellur <vbellur@redhat.com>2014-01-23 09:41:10 -0800
commita0fbd41d2b10829503df1826bf2c98dc347de739 (patch)
tree471c3b53e761b74b444572c66b0581cd126d66ea
parent6c9fe8fa8896c5f4fbe8c9bac6c2c7f9add92a0b (diff)
geo-rep: Fix no error when slave size less than master size
in df command output, default block-size is 1K, but BUFFER_SIZE is in bytes, so verify will succeed even if slave size is less than master size. Added -B1 to df command(that is --block-size=1) to get all values in bytes. BUG: 1056518 Change-Id: I2384d2a6f2505d967e0538b95fbf111c15b26f30 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/6746 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rwxr-xr-xgeo-replication/src/gverify.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/geo-replication/src/gverify.sh b/geo-replication/src/gverify.sh
index bd1b25f2482..24580be44f5 100755
--- a/geo-replication/src/gverify.sh
+++ b/geo-replication/src/gverify.sh
@@ -32,7 +32,7 @@ echo 0:0;
exit 1;
fi;
cd \$d;
-available_size=\$(df \$d | tail -1 | awk "{print \\\$2}");
+available_size=\$(df -B1 \$d | tail -1 | awk "{print \\\$2}");
umount -l \$d;
rmdir \$d;
ver=\$(gluster --version | head -1 | cut -f2 -d " ");
@@ -61,7 +61,7 @@ echo 0:0;
exit 1;
fi;
cd \$d;
-available_size=\$(df \$d | tail -1 | awk "{print \\\$4}");
+available_size=\$(df -B1 \$d | tail -1 | awk "{print \\\$4}");
no_of_files=\$(find \$d -maxdepth 0 -empty);
umount -l \$d;
rmdir \$d;