summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2014-01-17 16:45:55 +0530
committerVijay Bellur <vbellur@redhat.com>2014-02-02 20:25:09 -0800
commit0f018e33ec8510ef0afc7daa9f12b7e21c8c03dc (patch)
tree77c99ad334a5753ec6ffa22ca7fc6452de05f451
parent870ea37dcd440b33418bab5c9e2c69ca67bb668e (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: I21157a66b0500c954cb6ffb2a2cdf29163b3b269 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/6746 Reviewed-on: http://review.gluster.org/6846 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;