You need to modify the corresponding values according to your environment.
Cat testiscsi.sh#!/bin/bashworkd= '/home/vdbench050406 ' sdnum=1hdnum=1threadnum=8seekpct=100rdpct= 70xfersize=8kiorate=maxelapse=68400maxdata=1000ginterval=5name=multihost-${xfersize}-${seekpct}.fileecho "Hd=default,vdbench=${workd},user=root,shell=ssh" >> ${name}echo "hd=hd1,system=" >>${name}echo "hd=hd2,system=" >>${name} #echo "hd=hd3,system=" >>${name} #echo "hd=hd4,system=" >>${name} #echo "hd=hd5,system=" >>${name} #echo "HD =hd6,system= " >>${name}for dev in $ (ls -l /dev/disk/by-path/ |grep iscsi|awk ' {print $9} ') doecho "Sd=sd${sdnum},hd=hd${hdnum},lun=/dev/disk/by-path/${dev}, Openflags=o_direct,threads=${threadnum} " >>${name} ((sdnum=sdnum+1)) doneecho " wd=wd1,sd=sd*, Seekpct=${seekpct},rdpct=${rdpct},xfersize=${xfersize} " >>${name}echo " rd=rd1,wd=wd*,iorate=${ Iorate},elapse=${elapse},maxData=${maxdata},interval=${interval},warmup=30 " >>${name}
This article is from the "leaflet" blog, please be sure to keep this source http://muyuluo.blog.51cto.com/3246561/1982432
Mount iSCSI volumes automatically generate Vdbench script files