X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre-iokit%2Fsgpdd-survey%2Fsgpdd-survey;h=b5c1f015ebdcfe55030a8e4e33329f6e377aded5;hp=100d4561b68b33c6bd20497675aabb0383e9e06b;hb=76df542c5477d58209d44fb0d2a7bd2936336557;hpb=bfcff176c5c529caa395cd4c3ccf38d38ce6d62b diff --git a/lustre-iokit/sgpdd-survey/sgpdd-survey b/lustre-iokit/sgpdd-survey/sgpdd-survey index 100d456..b5c1f01 100755 --- a/lustre-iokit/sgpdd-survey/sgpdd-survey +++ b/lustre-iokit/sgpdd-survey/sgpdd-survey @@ -5,10 +5,9 @@ # CHOOSE EITHER scsidevs or rawdevs # the SCSI devices to measure - WARNING: will be erased. -#scsidevs="/dev/sde /dev/sdh" # The raw devices to use -#rawdevs="/dev/raw/raw1" -#scsidevs=`ls /dev/sd[a-z] /dev/sd[a-z][a-z]` # all devices, if you use udev +# rawdevs=${rawdevs:-"/dev/raw/raw1"} +# scsidevs=`ls /dev/sd[a-z] /dev/sd[a-z][a-z]` # all devices, if you use udev # result file prefix. date/time+hostname makes unique # NB ensure the path exists if it includes subdirs @@ -45,7 +44,7 @@ SG_MAX_QUEUE=16 # map given device names into SG device names i=0 devs=() -if [ $scsidevs ]; then +if [ "$scsidevs" ]; then # we will test for a LUN, the test for a partition # if the partition number is > 9 this will fail for d in $scsidevs; do @@ -62,7 +61,7 @@ if [ $scsidevs ]; then fi i=$((i+1)) done -elif [ $rawdevs ]; then +elif [ "$rawdevs" ]; then for r in $rawdevs; do RES=`raw -q $r` if [ $? -eq 0 ];then