Scroll to navigation

RESCAN-SCSI-BUS.SH(1) User Commands RESCAN-SCSI-BUS.SH(1)

NAME

rescan-scsi-bus.sh - script to add and remove SCSI devices without rebooting

SYNOPSIS

rescan-scsi-bus.sh [--alltargets] [--attachpq3] [-c] [---channels=CLIST] [--color] [-d] [--flush] [-f] [--forceremove] [--forcerescan] [--help] [--hosts=HLIST] [--ids=TLIST] [--ignore-rev] [--issue-lip] [-i] [--issue-lip-wait=SECS] [-I SECS] [-l] [-L NUM] [--largelun] [--luns=LLIST] [-m] [--multipath] [--nooptscan] [--nosync] [--remove] [--removelun2] [--resize] [--sparselun] [--sync] [--update] [--version] [--wide] [HOST1 [HOST2 ...]]

OPTIONS

Option are ordered by their long name. Those without a long name are ordered as if their single letter was a long name.

scan all targets, not just currently existing [default: disabled]
tell kernel to attach sg to LUN 0 that reports PQ=3
enables scanning of channels 0 1 [default: 0 / all detected ones]
scan only channel(s) in CLIST
use coloured prefixes OLD/NEW/DEL
enable debug [default: 0]
flush failed multipath devices [default: disabled]
remove stale devices (DANGEROUS)
remove and readd existing devices (DANGEROUS)
print usage message then exit
scan only host(s) in HLIST
scan only target ID(s) in TLIST
ignore (firmware) revision change. This is the third text field (4 bytes long) in a standard INQUIRY response.
issue a FibreChannel LIP reset [default: disabled]
issue a FibreChannel LIP reset and then wait SECS seconds.
activates scanning for LUNs 0--NUM [default: 0]
activates scanning for LUNs 0--7 [default: 0]
tell kernel to support LUNs > 7 even on SCSI2 devs
scan only lun(s) in NLIST
update multipath devices [default: disabled]
don't stop looking for LUNs is 0 is not found
do not issue a sync [default: sync if remove]
enables removing of devices [default: disabled]
tell kernel to try REPORT_LUN even on SCSI2 devices
look for resized disks and reload associated multipath devices, if applicable
tell kernel to support sparse LUN numbering
issue a sync [default: sync if remove]
look for existing disks that have been remapped
shows version string then exits. The version string is a numeric datestamp of the form YYYYMMDD.
scan for target device IDs 0--15 [default: 0--7]
Host numbers may thus be specified either directly on cmd line (deprecated) or with the --hosts=LIST parameter (recommended).

Arguments to options that end in LIST (e.g. TLIST) can have this form:
A[-B][,C[-D]]...
which is a comma separated list of single values and/or ranges (no spaces allowed).

SEE ALSO

There is a brief descripion here: https://fibrevillage.com/storage/585-rescan-scsi-bus-sh-script-for-adding-and-removing-scsi-devices-without-rebooting

sg3_utils Homepage: https://sg.danny.cz/sg

April 2021 rescan-scsi-bus.sh