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>
This commit is contained in:
Aravinda VK 2014-01-17 16:45:55 +05:30 committed by Vijay Bellur
parent 6c9fe8fa88
commit a0fbd41d2b

View File

@ -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;