HP 3PAR Ubuntu Operating System Implementation Guide
--color: use coloured prefixes OLD/NEW/DEL
--hosts=LIST: Scan only host(s) in LIST
--channels=LIST: Scan only channel(s) in LIST
--ids=LIST: Scan only target ID(s) in LIST
--luns=LIST: Scan only lun(s) in LIST
--sync/nosync: Issue a sync / no sync [default: sync if remove]
--attachpq3: Tell kernel to attach sg to LUN 0 that reports PQ=3
--reportlun2: Tell kernel to try REPORT_LUN even on SCSI2 devices
--largelun: Tell kernel to support LUNs > 7 even on SCSI2 devs
--sparselun: Tell kernel to support sparse LUN numbering
Host numbers may thus be specified either directly on cmd line (deprecated) or
or with the --hosts=LIST parameter (recommended).
LIST: A[-B][,C[-D]]... is a comma separated list of single values and ranges
(No spaces allowed.)
If the rescan-scsi-bus.sh method fails, HP recommends that you use the echo statement method,
where the scan is performed using the sys device tree.
Scan Methods for LUN Discovery
You can use the following methods to discover LUNs from the Ubuntu host.
• Method 1: Use sysfs scan for scanning multiple devices at once.
• Method 2: Use adding single devices for adding single devices one at a time.
Method 1 - sysfs Scan
After exporting VLUNS to the host using the createvlun command in “Exporting LUNs to the
Host” (page 22), use the echo statement on the sysfs file system to scan for devices:
# echo “- <target number> <lun number>” > <device scan path>
Example:
The device path is /sys/class/scsi_host/host2 and the target is 0 (target2:0:0) and
the exported device is LUN 1. The following is the echo command to be used.
# echo "- 0 1" > /sys/class/scsi_host/host2/scan
The following message log provides and example of the resulting output:
kernel: Vendor: 3PARdata Model: VV Rev: 0000
kernel: Type: Direct-Access ANSI SCSI revision: 03
kernel: SCSI device sdv: 524288 512-byte hdwr sectors (268 MB)
kernel: SCSI device sdv: drive cache: write back
kernel: sdv: unknown partition table
kernel: Attached scsi disk sdv at scsi2, channel 0, id 0, lun 1
kernel: Attached scsi generic sg22 at scsi2, channel 0, id 0, lun 1, type 0
scsi.agent[12915]: disk at /devices/pci0000:00/0000:00:02.0/0000:01:00.2/
0000:03:0b.0/0000:04:04.0/host2/target2:0:0/2:0:0:1
Alternatively, you can scan for all LUNs and targets for a given lpfc instance using the following
command:
# echo "- - -" > /sys/class/scsi_host/host2/scan
Discovering Devices 25