HP 3PAR Ubuntu Operating System Implementation Guide
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
(The SCSI midlayer will re-scan.)
# echo "scsi add-single-device 2 0 0 14" > /proc/scsi/scsi
You can see the new LUN presented to the OS by the SCSI Mid-Layer in the /var/log/messages
file.
kernel: Vendor: 3PARdata Model: VV Rev: 0000
kernel: Type: Direct-Access ANSI SCSI revision: 03
kernel: SCSI device sdac: 524288 512-byte hdwr sectors (268 MB)
kernel: SCSI device sdac: drive cache: write back
kernel: sdac: unknown partition table
kernel: Attached scsi disk sdac at scsi2, channel 0, id 0, lun 14
kernel: Attached scsi generic sg29 at scsi2, channel 0, id 0, lun 14, type 0
Dec 12 14:08:50 sqa-dell2850-01 scsi.agent[14234]: 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:14
NOTE: The echo command needs to be executed on multiple host instances where LUNs have
been exported.
Verifying Devices Found by the Host
To verify that the Ubuntu host has discovered the exported devices, look at the contents of the file
/proc/scsi/scsi. In this example, we have LUN 0 exported to the Ubuntu host through eight
paths (four HP 3PAR StoreServ Storage ports connecting to two Emulex HBA ports). This file should
contain entries for the attached devices:
# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: 3PARdata Model: VV Rev: 3122
Type: Direct-Access ANSI SCSI revision: 06
Host: scsi0 Channel: 00 Id: 00 Lun: 254
Vendor: 3PARdata Model: VV Rev: 3122
Type: Enclosure ANSI SCSI revision: 06
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: 3PARdata Model: VV Rev: 3122
Type: Direct-Access ANSI SCSI revision: 06
26 Allocating Storage for Access by the Ubuntu Host