From 6745b822d7127e599c8f3ccf0c43983c75ac01a0 Mon Sep 17 00:00:00 2001 From: Shuichi Ihara Date: Mon, 7 Nov 2011 18:45:33 +0900 Subject: [PATCH 1/1] LU-817 lustre-iokit: sgpdd-survey is encountering r/w errors on arrays using 2TB drives There are two fix/improvements in sgpdd-survey. (1) adding --lba option to sg_readcap for large LUNs. (2) support configurable boundadry block size between concurrent regions per device. Signed-off-by: Shuichi Ihara Change-Id: Ib3cdb051cf55e096919ad63a42640aaacfe511c4 Reviewed-on: http://review.whamcloud.com/1658 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Cliff White Reviewed-by: Minh Diep Reviewed-by: Oleg Drokin --- lustre-iokit/sgpdd-survey/sgpdd-survey | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lustre-iokit/sgpdd-survey/sgpdd-survey b/lustre-iokit/sgpdd-survey/sgpdd-survey index d9ad8ae..5014024 100755 --- a/lustre-iokit/sgpdd-survey/sgpdd-survey +++ b/lustre-iokit/sgpdd-survey/sgpdd-survey @@ -29,6 +29,9 @@ rszhi=${rszhi:-1024} crglo=${crglo:-1} crghi=${crghi:-256} +# boundary blocks between concurrent regions per device +boundary=${boundary:-1024} + # threads to share between concurrent regions per device # multiple threads per region simulates a deeper request queue # NB survey skips over #thr < #regions and #thr/#regions > SG_MAX_QUEUE @@ -99,7 +102,7 @@ ndevs=${#devs[@]} # determine block size. This should also work for raw devices # If it fails, set to 512 -bs=$((`sg_readcap -b ${devs[0]} | awk '{print $2}'`)) +bs=$((`sg_readcap -lb ${devs[0]} | awk '{print $2}'`)) if [ $bs == 0 ];then echo "sg_readcap failed, setting block size to 512" bs=512 @@ -152,7 +155,7 @@ for ((rsz=$rszlo;rsz<=$rszhi;rsz*=2)); do t0=`date +%s.%N` for ((i=0;i ${tmpf}_${i}_${j} \ - $inf $outf ${skip}=$((1024+j*blocks)) \ + $inf $outf ${skip}=$((boundary+j*blocks)) \ thr=$((thr/crg)) count=$count bs=$bs bpt=$bpt time=1& done done -- 1.8.3.1