HP 3PAR SUSE Linux Enterprise Implementation Guide

Method 1 - sysfs Scan
After exporting VLUNS to the host using the createvlun command in “Exporting LUNs to the
Host (page 47), 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
OR use the following script to scan for all LUNs for all the lpfc instances:
# /usr/bin/rescan-scsi-bus.sh
If the device has changed its size, then issue the following command to obtain the new disk size:
Method 2 - Adding Single Devices
To add LUNs by using the echo scsi add statement, run the following commands:
# echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi
where:
0 specifies the host
1 specifies the channel
2 specifies the ID
3 specifies the LUN
50 Allocating Storage for Access by the SUSE Host