• Home
  • Raw
  • Download

Lines Matching +full:stale +full:- +full:pr +full:- +full:message

2 # Script to rescan SCSI bus, using the scsi add-single-device mechanism.
3 # (c) 1998--2010 Kurt Garloff <kurt@garloff.de>, GNU GPL v2 or v3
4 # (c) 2006--2022 Hannes Reinecke, GNU GPL v2 or later
5 # $Id: rescan-scsi-bus.sh,v 1.57 2012/03/31 14:08:48 garloff Exp $
10 TMPLUNINFOFILE="/tmp/rescan-scsi-mpath-info.txt"
29 if [ "$debug" -eq 1 ] ; then
42 declare -i cntr=0
43 while [ $cntr -lt "$LN" ] ; do BK="$BK\e[D"; let cntr+=1; done
44 echo -en "$STRG$BK"
52 declare -i cntr=0
53 while [ $cntr -lt "$LN" ] ; do BK="$BK\e[D"; WH="$WH "; let cntr+=1; done
54 echo -en "$WH$BK"
62 [ -e "$hostdir" ] || continue
64 if [ -f "$hostdir/isp_name" ] ; then
66 elif [ -f "$hostdir/lpfc_drvr_version" ] ; then
74 if [ -z "$hosts" ] ; then
79 hosts=$(echo $hosts | tr ' ' '\n' | sort -n)
94 if [ -r "$hostdir/status" ] ; then
95 num=$(printf '%d\n' "$(sed -n 's/SCSI host number://p' "$hostdir/status")")
109 0) echo "Direct-Access" ;;
110 1) echo "Sequential-Access" ;;
114 5) echo "CD-ROM" ;;
116 7) echo "Optical-Device" ;;
117 8) echo "Medium-Changer" ;;
123 14) echo "Direct-Access-RBC" ;;
142 if [ -z "$1" ] ; then
150 if [ -d /sys/class/scsi_device ]; then
152 if [ -d "$SCSIPATH" ] ; then
154 if [ "$LN" -gt 0 ] ; then
158 SCSIDEV=$(printf ' Vendor: %-08s Model: %-16s Rev: %-4s' "$IVEND" "$IPROD" "$IPREV")
162 if [ "$LN" -gt 1 ] ; then
166 …SCSITMP=$(printf ' Type: %-17s ANSI SCSI revision: %02d' "$ITYPE" "$((ILVL - 1))…
175 SCSISTR=$(grep -A "$LN" -e "$grepstr" /proc/scsi/scsi)
177 if [ -z "$SCSISTR" ] ; then
193 if [ ! -e "$scsidev" ]; then
199 if [ -e "$gendev" ] ; then
206 # Find sg device with 2.4 report-devs extensions
210 …SGDEV=$(echo "$SCSISTR" | grep 'Attached drivers:' | sed 's/^ *Attached drivers: \(sg[0-9]*\).*/\1…
219 if [ -d /sys/class/scsi_device ] ; then
223 repdevstat=$((1-$?))
225 echo "scsi report-devs 1" >/proc/scsi/scsi
227 [ $? -eq 1 ] && return
229 if ! echo "$DRV" | grep -q 'drivers: sg'; then
234 echo "scsi report-devs 0" >/proc/scsi/scsi
243 # (cd /sys/class/scsi_device && for d in *; do set ${d//:/ }; echo -n "$d $(</sys/class/scsi_device…
250 b=$(hexdump -n1 -e '/1 "%02X"' "$p" 2>/dev/null)
251 if [ -n "$b" ]; then
254 sg_inq /dev/$SGDEV 2>/dev/null | sed -n 's/^.*RMB=\([0-9]*\).*$/\1/p'
273 [ ! -x /usr/bin/sg_turs ] && return 0
275 [ -z "$SGDEV" ] && return 0
280 while [ $RC = 2 -o $RC = 6 ] && [ $ctr -lt $timeout ] ; do
281 if [ $RC = 2 ] && [ "$RMB" != "1" ] && sg_inq /dev/$SGDEV | grep -q -i "PQual=0" ; then
282 echo -n "."
300 # echo -e "\e[A\e[A\e[A${yellow}Test existence of $SGDEV = $RC ${norm} \n\n\n"
306 if [ -z "$INQ" ] ; then
307 echo -e "\e[A\e[A\e[A\e[A${red}$SGDEV changed: ${bold}INQUIRY failed${norm} \n\n\n"
313 STR=$(printf " Vendor: %-08s Model: %-16s Rev: %-4s" "$IVEND" "$IPROD" "$IPREV")
314 IPTYPE=$(echo "$INQ" | sed -n 's/.* Device_type=\([0-9]*\) .*/\1/p')
315 if [ -z "$IPTYPE" ]; then
316 IPTYPE=$(echo "$INQ" | sed -n 's/.* PDT=\([0-9]*\) .*/\1/p')
318 IPQUAL=$(echo "$INQ" | sed -n 's/ *PQual=\([0-9]*\) Device.*/\1/p')
319 if [ -z "$IPQUAL" ] ; then
320 IPQUAL=$(echo "$INQ" | sed -n 's/ *PQual=\([0-9]*\) PDT.*/\1/p')
323 [ -z "$IPQUAL" ] && IPQUAL=3
324 [ -z "$IPTYPE" ] && IPTYPE=31
325 …echo -e "\e[A\e[A\e[A\e[A${red}$SGDEV changed: ${bold}LU not available (PQual $IPQUAL)${norm} \…
331 echo -e "\e[A\e[A\e[A\e[A${red}$SGDEV removed. ${norm}\n\n\n"
335 if [ "$ignore_rev" -eq 0 ] ; then
337 …echo -e "\e[A\e[A\e[A\e[A${red}$SGDEV changed: ${bold}\nfrom:${SCSISTR#* } \nto: $STR ${norm} \n\n…
348 …echo -e "\e[A\e[A\e[A\e[A${red}$SGDEV changed: ${bold}\nfrom:${SCSISTR#* } \nto: $STR ${norm} \n\n…
352 TMPSTR=$(echo "$SCSISTR" | sed -n 's/.*Type: *\(.*\) *ANSI.*/\1/p' | sed 's/ *$//g')
354 … echo -e "\e[A\e[A\e[A\e[A${red}$SGDEV changed: ${bold}\nfrom:${TMPSTR} \nto: $TYPE ${norm} \n\n\n"
367 if procscsiscsi && [ -z "$1" ] ; then
368 echo "$SCSISTR" | head -n1
369 echo "$SCSISTR" | tail -n2 | pr -o4 -l1
382 [ -d "$dev" ] || continue;
387 if [ "$chan" -eq "$tmpchan" ] ; then
391 if [ -n "$chan" ] ; then
395 if [ -z "$channelsearch" ] ; then
407 oldlist=$(find /sys/class/scsi_device -name "${host}:${channel}:*" -printf "%f\n")
409 echo "${channel} - -" > "/sys/class/scsi_host/host${host}/scan"
410 newlist=$(find /sys/class/scsi_device -name "${host}:${channel}:*" -printf "%f\n")
419 if [ -n "$oldid" ] ; then
420 if [ -d /sys/class/scsi_device/$oldid ] ; then
430 …idsearch=$(find /sys/bus/scsi/devices -name "target${host}:${channel}:*" -printf "%f\n" | cut -f 3…
438 [ -z "$SGDEV" ] && return 1
439 if [ ! -x /usr/bin/sg_luns ] ; then
443 LLUN=$(sg_luns /dev/$SGDEV 2>/dev/null | sed -n 's/ \(.*\)/\1/p')
444 # Added -z $LLUN condition because $? gets the RC from sed, not sg_luns
445 if [ $? -ne 0 ] || [ -z "$LLUN" ] ; then
466 if [ -x /sbin/udevadm ] ; then
470 while [ $tmo -gt 0 ] ; do
471 if ! /sbin/udevadm settle --timeout=1 | egrep -q sd[a-z]+ ; then
474 let tmo=$tmo-1
477 elif [ -x /sbin/udevsettle ] ; then
493 echo -e " Scanning for device $devnr ... "
502 # Well known lun transition case. Only for Direct-Access devs (type 0)
503 # If block directory exists && and PQUAL != 0, we unmapped lun0 and just have a well-known lun
505 if [ "$lun" -eq 0 ] && [ $IPTYPE -eq 0 ] ; then
507 if [ -e "$devpath" ] ; then
508 if [ -d "$devpath/block" ] ; then
509 remappedlun0=2 # Transition from real lun 0 to well-known
514 elif [ $RC = 0 ] && [ $IPTYPE -eq 0 ] ; then
515 if [ -e "$devpath" ] ; then
516 if [ ! -d "$devpath/block" ] ; then
517 remappedlun0=1 # Transition from well-known to real lun 0
526 if [ "$lun" = "0" ] && [ "$1" = "1" ] && [ -z "$remappedlun0" ] ; then
532 if [ "$remove" ] && [ "$SCSISTR" -o "$remappedlun0" = "1" ] ; then
533 if [ $RC != 0 ] || [ ! -z "$forceremove" ] || [ -n "$remappedlun0" ] ; then
535 echo -en "\r\e[A\e[A\e[A${red}REM: "
536 echo "$SCSISTR" | head -n1
537 echo -e "${norm}\e[B\e[B"
539 if [ -e "$devpath" ] ; then
548 echo "scsi remove-single-device $devnr" > /proc/scsi/scsi
549 if [ $RC -eq 1 ] || [ "$lun" -eq 0 ] ; then
551 echo "scsi add-single-device $devnr" > /proc/scsi/scsi
556 if [ -e "$devpath" ] ; then
562 if [ -z "$SCSISTR" ] && [ $RC != 1 ] && [ "$remappedlun0" != "1" ] ; then
568 if [ -z "$SCSISTR" ] || [ -n "$remappedlun0" ] ; then
573 if [ -e "/sys/class/scsi_host/host${host}/scan" ] ; then
576 echo "scsi add-single-device $devnr" > /proc/scsi/scsi
579 if [ -z "$SCSISTR" ] ; then
582 # Optimization: if lun==0, stop here (only if in non-remove mode)
583 if [ "$lun" = 0 ] && [ -z "$remove" ] && [ "$optscan" = 1 ] ; then
601 echo -en " Scanning for device $devnr ...\r"
605 testexist -q
606 if [ -z "$SCSISTR" ] ; then
609 if [ -e "/sys/class/scsi_host/host${host}/scan" ] ; then
613 echo "scsi add-single-device $devnr" > /proc/scsi/scsi
615 testexist -q
616 if [ -n "$SCSISTR" ] ; then
624 [ -d "$dev" ] || continue
634 olddev=$(find /sys/class/scsi_device/ -name "$host:$channel:$id:*" 2>/dev/null | sort -t: -k4 -n)
636 # OK -- if we don't have a LUN to send a REPORT_LUNS to, we could
642 if [ -e "/sys/class/scsi_host/host${host}/scan" ] ; then
643 echo "$channel $id -" > "/sys/class/scsi_host/host${host}/scan" 2> /dev/null
646 echo "scsi add-single-device $host $channel $id $SCAN_WILD_CARD" > /proc/scsi/scsi
648 …targetluns=$(find /sys/class/scsi_device/ -name "$host:$channel:$id:*" -printf "%f\n" | cut -d : -
649 let found+=$(echo "$targetluns" | wc -l)
650 let found-=$(echo "$olddev" | wc -l)
652 [ -z "$targetluns" ] && targetluns="$oldtargets"
655 [ -d "$dev" ] || continue
664 [ $? -eq 1 ] && break
671 if [ -z "$inlist" ]; then
672 # Stale lun
678 # Add new ones and check stale ones
681 [ $? -eq 1 ] && break
688 if [ -z "$channelsearch" ] ; then
692 if [ -z "$idsearch" ] ; then
693 if [ -z "$lunsearch" ] ; then
696 …idsearch=$(find /sys/bus/scsi/devices -name "target${host}:${channel}:*" -printf "%f\n" | cut -f 3…
700 if [ -z "$lunsearch" ] ; then
705 [ $? -eq 1 ] && break
718 while [ ! -z "$first" ] ; do
719 beg=${first%%-*};
723 end=${first#*-}
724 result="$result $(seq -s ' ' $beg $end)"
740 targets=$(find /sys/bus/scsi/devices -name "target${host}:*" -printf "%f\n" | cut -d : -f 2-3)
742 [ -z "$targets" ] && return
748 if [ -n "$channelsearch" ] ; then
750 [ $tmpch -eq "$channel" ] && match=1
756 [ $match -eq 0 ] && continue
759 if [ "$filter_ids" -eq 1 ] ; then
769 [ $match -eq 0 ] && continue
771 if [ -z "$lunsearch" ] ; then
776 [ $? -eq 1 ] && break
790 truncate -s 0 $TMPLUNINFOFILE
791 for mp in $($DMSETUP ls --target=multipath | cut -f 1) ; do
793 maj_min=$($DMSETUP status "$mp" | cut -d " " -f14)
794 if [ ! -L /dev/mapper/${mp} ]; then
799 if [[ $? -ne 0 || -z "$ret" ]]; then
804 uuid=$(cut -f2 -d- "/sys/block/$dmtmp/dm/uuid")
821 tmpfile=$(mktemp /tmp/rescan-scsi-bus.XXXXXXXX 2> /dev/null)
822 if [ -z "$tmpfile" ] ; then
823 tmpfile="/tmp/rescan-scsi-bus.$$"
824 rm -f $tmpfile
830 if [ -d "/sys/class/scsi_device/$hctl/device/block" ] ; then
832 id_serial_old=$(udevadm info -q all -n "$sddev" | grep "ID_SERIAL=" | cut -d"=" -f2)
833 [ -z "$id_serial_old" ] && id_serial_old="none"
839 echo -n "Triggering udev to update device information... "
847 while read -r hctl sddev id_serial_old ; do
849 id_serial=$(udevadm info -q all -n "$sddev" | grep "ID_SERIAL=" | cut -d"=" -f2)
850 [ -z "$id_serial" ] && id_serial="none"
856 if [ -n "$mp_enable" ] && [ $remapped -eq 0 ]; then
858 if [ $? -eq 1 ] ; then
865 if [ "$id_serial" = "1" ] || [ $remapped -eq 0 ] ; then
869 host=$(echo "$hctl" | cut -d":" -f1)
870 channel=$(echo "$hctl" | cut -d":" -f2)
871 id=$(echo "$hctl" | cut -d":" -f3)
872 lun=$(echo "$hctl" | cut -d":" -f4)
877 rm -f $tmpfile
879 if [ -n "$mp_enable" ] && [ -n "$mpaths" ] ; then
889 if [ -n "$hctl" ] ; then
900 if [ -n "$hctl" ] ; then
901 if ! echo "$CHGDEVS" | grep -q "\[$hctl\]"; then
909 if [ -n "$mp_enable" ] ; then
913 if [ -n "$sdev" ] ; then
922 if [ -n "$hctl" ] ; then
929 if [ -n "$mp_enable" ] ; then
933 if [ -n "$sdev" ] ; then
946 if [ -e "$blkpath" ] ; then
975 if [ -z "$dev" ] || [ ! -x "$DMSETUP" ] || [ ! -x "$MULTIPATH" ] ; then
980 mp=$(cat $TMPLUNINFOFILE | grep -w "$maj_min" | cut -d " " -f1)
981 if [ -n "$mp" ]; then
982 if [ -n "$find_mismatch" ] ; then
983 uuid=$(cat $TMPLUNINFOFILE | grep -w "$maj_min" | cut -d " " -f4)
997 if [ $found_dup -eq 1 ] ; then
1007 if [ ! -x "$MULTIPATH" ] ; then
1008 echo "no -x multipath"
1015 $MULTIPATH -r > /dev/null 2>&1
1021 echo -n "Reloading multipath device $mpath... "
1022 if $MULTIPATH -r "$mpath" > /dev/null 2>&1 ; then
1035 echo -n "Resizing multipath map $mpath ..."
1036 multipathd -k"resize map $mpath"
1048 if [ -n "$1" ] ; then
1049 for mpath in $($DMSETUP ls --target=multipath | cut -f 1) ; do
1051 …num=$($DMSETUP status "$mpath" | awk 'BEGIN{RS=" ";active=0}/[0-9]+:[0-9]+/{dev=1}/A/{if (dev == 1…
1052 if [ "$num" -eq 0 ] ; then
1062 echo -n "Flushing multipath device $mpath... "
1063 while [ $i -lt $flush_retries ] ; do
1064 $DMSETUP message "$mpath" 0 fail_if_no_path > /dev/null 2>&1
1065 if $MULTIPATH -f "$mpath" > /dev/null 2>&1 ; then
1068 elif [ $i -eq $flush_retries ] ; then
1089 declare -a mpathsizes
1091 if [ -z "$lunsearch" ] ; then
1095 devs="$devs $(cd /sys/class/scsi_device/ && ls -d *:${lun})"
1101 if [ -d "$sysfs_path/block" ] ; then
1110 host=$(echo "$hctl" | cut -d":" -f1)
1111 channel=$(echo "$hctl" | cut -d":" -f2)
1112 id=$(echo "$hctl" | cut -d":" -f3)
1113 lun=$(echo "$hctl" | cut -d":" -f4)
1122 if [ -n "$mp_enable" ] && [ -n "$mpaths" ] ; then
1125 mpathsizes[$i]="$($MULTIPATH -l "$m" | egrep -o [0-9]+.[0-9]+[KMGT])"
1131 mpathsize="$($MULTIPATH -l "$m" | egrep -o [0-9\.]+[KMGT])"
1143 if [ "@$1" = @--help ] || [ "@$1" = @-h ] || [ "@$1" = "@-?" ] ; then
1144 echo "Usage: rescan-scsi-bus.sh [options] [host [host ...]]"
1146 echo " -a scan all targets, not just currently existing [default: disabled]"
1147 echo " -c enables scanning of channels 0 1 [default: 0 / all detected ones]"
1148 echo " -d enable debug [default: 0]"
1149 echo " -f flush failed multipath devices [default: disabled]"
1150 echo " -h help: print this usage message then exit"
1151 echo " -i issue a FibreChannel LIP reset [default: disabled]"
1152 echo " -I SECS issue a FibreChannel LIP reset and wait for SECS seconds [default: disabled]"
1153 echo " -l activates scanning for LUNs 0--7 [default: 0]"
1154 echo " -L NUM activates scanning for LUNs 0--NUM [default: 0]"
1155 echo " -m update multipath devices [default: disabled]"
1156 echo " -r enables removing of devices [default: disabled]"
1157 echo " -s look for resized disks and reload associated multipath devices, if applicable"
1158 echo " -t SECS timeout for testing if device is online. Test is skipped if 0 [default: 30]"
1159 echo " -u look for existing disks that have been remapped"
1160 echo " -V print version date then exit"
1161 echo " -w scan for target device IDs 0--15 [default: 0--7]"
1162 echo "--alltargets: same as -a"
1163 echo "--attachpq3: Tell kernel to attach sg to LUN 0 that reports PQ=3"
1164 echo "--channels=LIST: Scan only channel(s) in LIST"
1165 echo "--color: use coloured prefixes OLD/NEW/DEL"
1166 echo "--flush: same as -f"
1167 echo "--forceremove: Remove stale devices (DANGEROUS)"
1168 echo "--forcerescan: Remove and readd existing devices (DANGEROUS)"
1169 echo "--help: print this usage message then exit"
1170 echo "--hosts=LIST: Scan only host(s) in LIST"
1171 echo "--ids=LIST: Scan only target ID(s) in LIST"
1172 echo "--ignore-rev: Ignore the revision change"
1173 echo "--issue-lip: same as -i"
1174 echo "--issue-lip-wait=SECS: same as -I"
1175 echo "--largelun: Tell kernel to support LUNs > 7 even on SCSI2 devs"
1176 echo "--luns=LIST: Scan only lun(s) in LIST"
1177 echo "--multipath: same as -m"
1178 echo "--no-lip-scan: don't scan FC Host with issue-lip"
1179 echo "--nooptscan: don't stop looking for LUNs if 0 is not found"
1180 echo "--remove: same as -r"
1181 echo "--reportlun2: Tell kernel to try REPORT_LUN even on SCSI2 devices"
1182 echo "--resize: same as -s"
1183 echo "--sparselun: Tell kernel to support sparse LUN numbering"
1184 echo "--sync/nosync: Issue a sync / no sync [default: sync if remove]"
1185 echo "--timeout=SECS: same as -t"
1186 echo "--update: same as -u"
1187 echo "--version: same as -V"
1188 echo "--wide: same as -w"
1191 echo "or with the --hosts=LIST parameter (recommended)."
1192 echo "LIST: A[-B][,C[-D]]... is a comma separated list of single values and ranges"
1197 if [ "@$1" = @--version ] || [ "@$1" = @-V ] ; then
1202 if [ ! -d /sys/class/scsi_host/ ] && [ ! -d /proc/scsi/ ] ; then
1210 if [ -x /usr/bin/sg_inq ] ; then
1211 sg_version=$(sg_inq -V 2>&1 | cut -d " " -f 3)
1212 if [ -n "$sg_version" ] ; then
1219 if [ -z "$sg_version" ] || [ "$sg_version" -lt 70 ] ; then
1220 sg_len_arg="-36"
1222 sg_len_arg="--len=36"
1225 echo "WARN: /usr/bin/sg_inq not present -- please install sg3_utils"
1226 echo " or rescan-scsi-bus.sh might not fully work."
1233 opt_idsearch=$(seq -s ' ' 0 7)
1245 lipreset=-1
1247 declare -i scan_flags=0
1253 while [ ! -z "$opt" ] && [ -z "${opt##-*}" ] ; do
1254 opt=${opt#-}
1262 l) lunsearch=$(seq -s ' ' 0 7) ;;
1263 L) lunsearch=$(seq -s ' ' 0 "$2"); shift ;;
1269 w) opt_idsearch=$(seq -s ' ' 0 15) ;;
1270 -alltargets) existing_targets=;;
1271 -attachpq3) scan_flags=$((scan_flags|0x1000000)) ;;
1272 -channels=*) arg=${opt#-channels=};opt_channelsearch=$(expandlist "$arg") ;;
1273 -color) setcolor ;;
1274 -flush) flush=1 ;;
1275 -forceremove) remove=1; forceremove=1 ;;
1276 -forcerescan) remove=1; forcerescan=1 ;;
1277 -hosts=*) arg=${opt#-hosts=}; hosts=$(expandlist "$arg") ;;
1278 -ids=*) arg=${opt#-ids=}; opt_idsearch=$(expandlist "$arg") ; filter_ids=1;;
1279 -ignore-rev) ignore_rev=1;;
1280 -issue-lip) lipreset=0 ;;
1281 -issue-lip-wait=*) lipreset=${opt#-issue-lip-wait=};;
1282 -largelun) scan_flags=$((scan_flags|0x200)) ;;
1283 -luns=*) arg=${opt#-luns=}; lunsearch=$(expandlist "$arg") ;;
1284 -multipath) mp_enable=1 ;;
1285 -no-lip-scan) no_lip_scan=1 ;;
1286 -nooptscan) optscan=0 ;;
1287 -nosync) sync=0 ;;
1288 -remove) remove=1 ;;
1289 -reportlun2) scan_flags=$((scan_flags|0x20000)) ;;
1290 -resize) resize=1;;
1291 -timeout=*) timeout=${opt#-timeout=};;
1292 -sparselun) scan_flags=$((scan_flags|0x40)) ;;
1293 -sync) sync=2 ;;
1294 -update) update=1;;
1295 -wide) opt_idsearch=$(seq -s ' ' 0 15) ;;
1296 *) echo "Unknown option -$opt !" ;;
1302 if [ -z "$hosts" ] ; then
1303 if [ -d /sys/class/scsi_host ] ; then
1310 if [ -d /sys/class/scsi_host ] && [ ! -w /sys/class/scsi_host ]; then
1311 echo "You need to run scsi-rescan-bus.sh as root"
1319 if [ -w /sys/module/scsi_mod/parameters/default_dev_flags ] && [ $scan_flags != 0 ] ; then
1323 echo -n "Temporarily setting kernel scanning flags from "
1331 [ -z "$DMSETUP" ] && flush= && mp_enable=
1333 [ -z "$MULTIPATH" ] && flush= && mp_enable=
1335 echo -n "Scanning SCSI subsystem for new devices"
1336 [ -z "$flush" ] || echo -n ", flush failed multipath devices,"
1337 [ -z "$remove" ] || echo -n " and remove devices that have disappeared"
1339 declare -i found=0
1340 declare -i updated=0
1341 declare -i rmvd=0
1343 if [ -n "$flush" ] ; then
1344 if [ -x "$MULTIPATH" ] ; then
1350 if [ $update -eq 1 ] ; then
1357 elif [ $resize -eq 1 ] ; then
1363 echo -n "Scanning host $host "
1364 if [ $no_lip_scan -eq 0 ] && [ -e "/sys/class/fc_host/host$host" ] ; then
1367 if [ -e "$issue_lip" ] && [ "$lipreset" -ge 0 ] ; then
1370 [ "$lipreset" -gt 0 ] && sleep "$lipreset"
1378 [ -n "$channelsearch" ] && echo -n "channels $channelsearch "
1379 echo -n "for "
1380 if [ -n "$idsearch" ] ; then
1381 echo -n " SCSI target IDs $idsearch"
1383 echo -n " all SCSI target IDs"
1385 if [ -n "$lunsearch" ] ; then
1391 if [ -n "$existing_targets" ] ; then
1397 if [ -n "$OLD_SCANFLAGS" ] ; then
1403 if [ -n "$mp_enable" ] && [ $rmvd_found -gt 0 ] ; then
1405 if [ $rmvd -gt 0 ] ; then
1410 if [ $found -gt 0 ] ; then
1411 /sbin/udevadm trigger --sysname-match=sd*
1413 if [ -x "$MULTIPATH" ] ; then
1421 if [ ! -z "$FOUNDDEVS" ] ; then
1422 echo -e "$FOUNDDEVS"
1425 if [ ! -z "$CHGDEVS" ] ; then
1426 echo -e "$CHGDEVS"
1429 if [ ! -z "$RMVDDEVS" ] ; then
1430 echo -e "$RMVDDEVS"
1434 # sh-basic-offset: 2