Prologue:
My Storage Admin has presented new SAN disks, so I want to rescan the new LUNs without rebooting this IBM server. On HP Proliant, I know I can use hp_rescan utility but I can't find similar utility provided by IBM. Thanks God I managed to find a nice utility provided by QLogic.
Server Model: IBM x3650 M2
OS: RHEL 5.4 x86_64
HBA card:
[root@sgbwaprecdb01 ~]# lspci | grep -i hba
1f:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
24:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
Here are the steps...
- Download "Linux Utilities" tarball from http://driverdownloads.qlogic.com/QLogicDriverDownloads_UI/SearchByOs.aspx?ProductCategory=39&OsCategory=2&Os=65&OsCategoryName=Linux
- Extract the tarball,
[root@sgbwaprecdb01 ~]# tar xzvf Linux-Tools-20090804-2.tgz -C /opt/
Linux-Tools-20090804-2/
Linux-Tools-20090804-2/ql-dynamic-tgt-lun-disc-2.19.tgz
Linux-Tools-20090804-2/ql-hba-snapshot-1.14.tgz
Linux-Tools-20090804-2/ql-hba-collect-1.10.tgz
Linux-Tools-20090804-2/ql-set-cmd-timeout-1.8.tgz
Linux-Tools-20090804-2/ql-lun-state-online-1.6.tgz
[root@sgbwaprecdb01 ~]# mv /opt/Linux-Tools-20090804-2 /opt/qlogic - Extract ql-dynamic-tgt-lun-disc-2.19.tgz,
[root@sgbwaprecdb01 ~]# cd /opt/qlogic/
[root@sgbwaprecdb01 qlogic]# tar xzvf ql-dynamic-tgt-lun-disc-2.19.tgz
ql-dynamic-tgt-lun-disc-2.19/
ql-dynamic-tgt-lun-disc-2.19/COPYING
ql-dynamic-tgt-lun-disc-2.19/README.ql-dynamic-tgt-lun-disc.txt
ql-dynamic-tgt-lun-disc-2.19/revision.qldynamic.txt
ql-dynamic-tgt-lun-disc-2.19/ql-dynamic-tgt-lun-disc.sh
ql-dynamic-tgt-lun-disc-2.19/sg3_utils-1.23.tgz - View multipath topology before scanning,
[root@sgbwaprecdb01 ~]# multipath -l
mpath0 (360050768018f032ea000000000000060) dm-7 IBM,2145
[size=450G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=0][active]
\_ 7:0:0:0 sdc 8:32 [active][undef]
\_ 8:0:1:0 sdf 8:80 [active][undef]
\_ round-robin 0 [prio=0][enabled]
\_ 7:0:1:0 sdd 8:48 [active][undef]
\_ 8:0:0:0 sde 8:64 [active][undef] - Run ql-dynamic-tgt-lun-disc.sh to perform LUNs scanning,
[root@sgbwaprecdb01 ql-dynamic-tgt-lun-disc-2.19]# ./ql-dynamic-tgt-lun-disc.sh -s
Scanning HOST: host7
Scanning HOST: host8
Found
7:0:0:1
7:0:1:1
8:0:0:1
8:0:1:1It's a good idea to view the syslog to see what is happening,
CODE:-
Apr 9 15:50:21 localhost kernel: Vendor: IBM Model: 2145 Rev: 0000
-
Apr 9 15:50:21 localhost kernel: Type: Direct-Access ANSI SCSI revision: 04
-
Apr 9 15:50:21 localhost kernel: SCSI device sdg: 524288000 512-byte hdwr sectors (268435 MB)
-
Apr 9 15:50:21 localhost kernel: sdg: Write Protect is off
-
Apr 9 15:50:21 localhost kernel: SCSI device sdg: drive cache: write through w/ FUA
-
Apr 9 15:50:21 localhost kernel: SCSI device sdg: 524288000 512-byte hdwr sectors (268435 MB)
-
Apr 9 15:50:21 localhost kernel: sdg: Write Protect is off
-
Apr 9 15:50:21 localhost kernel: SCSI device sdg: drive cache: write through w/ FUA
-
Apr 9 15:50:21 localhost kernel: sdg: unknown partition table
-
Apr 9 15:50:21 localhost multipathd: sdg: add path (uevent)
-
Apr 9 15:50:21 localhost kernel: sd 7:0:0:1: Attached scsi disk sdg
-
Apr 9 15:50:21 localhost kernel: sd 7:0:0:1: Attached scsi generic sg6 type 0
-
Apr 9 15:50:21 localhost kernel: Vendor: IBM Model: 2145 Rev: 0000
-
Apr 9 15:50:21 localhost kernel: Type: Direct-Access ANSI SCSI revision: 04
-
Apr 9 15:50:21 localhost kernel: SCSI device sdh: 524288000 512-byte hdwr sectors (268435 MB)
-
Apr 9 15:50:21 localhost kernel: sdh: Write Protect is off
-
Apr 9 15:50:21 localhost kernel: SCSI device sdh: drive cache: write through w/ FUA
-
Apr 9 15:50:21 localhost kernel: SCSI device sdh: 524288000 512-byte hdwr sectors (268435 MB)
-
Apr 9 15:50:21 localhost kernel: sdh: Write Protect is off
-
Apr 9 15:50:21 localhost kernel: SCSI device sdh: drive cache: write through w/ FUA
-
Apr 9 15:50:21 localhost kernel: sdh: unknown partition table
-
Apr 9 15:50:21 localhost kernel: sd 7:0:1:1: Attached scsi disk sdh
-
Apr 9 15:50:21 localhost kernel: sd 7:0:1:1: Attached scsi generic sg7 type 0
-
Apr 9 15:50:21 localhost kernel: Vendor: IBM Model: 2145 Rev: 0000
-
Apr 9 15:50:21 localhost kernel: Type: Direct-Access ANSI SCSI revision: 04
-
Apr 9 15:50:21 localhost kernel: SCSI device sdi: 524288000 512-byte hdwr sectors (268435 MB)
-
Apr 9 15:50:21 localhost kernel: sdi: Write Protect is off
-
Apr 9 15:50:21 localhost kernel: SCSI device sdi: drive cache: write through w/ FUA
-
Apr 9 15:50:21 localhost kernel: SCSI device sdi: 524288000 512-byte hdwr sectors (268435 MB)
-
Apr 9 15:50:21 localhost kernel: sdi: Write Protect is off
-
Apr 9 15:50:21 localhost kernel: SCSI device sdi: drive cache: write through w/ FUA
-
Apr 9 15:50:21 localhost kernel: sdi: unknown partition table
-
Apr 9 15:50:21 localhost kernel: sd 8:0:0:1: Attached scsi disk sdi
-
Apr 9 15:50:21 localhost kernel: sd 8:0:0:1: Attached scsi generic sg8 type 0
-
Apr 9 15:50:21 localhost kernel: Vendor: IBM Model: 2145 Rev: 0000
-
Apr 9 15:50:21 localhost kernel: Type: Direct-Access ANSI SCSI revision: 04
-
Apr 9 15:50:21 localhost kernel: SCSI device sdj: 524288000 512-byte hdwr sectors (268435 MB)
-
Apr 9 15:50:21 localhost kernel: sdj: Write Protect is off
-
Apr 9 15:50:21 localhost kernel: SCSI device sdj: drive cache: write through w/ FUA
-
Apr 9 15:50:21 localhost kernel: SCSI device sdj: 524288000 512-byte hdwr sectors (268435 MB)
-
Apr 9 15:50:21 localhost kernel: sdj: Write Protect is off
-
Apr 9 15:50:21 localhost kernel: SCSI device sdj: drive cache: write through w/ FUA
-
Apr 9 15:50:21 localhost kernel: sdj: unknown partition table
-
Apr 9 15:50:21 localhost kernel: sd 8:0:1:1: Attached scsi disk sdj
-
Apr 9 15:50:21 localhost kernel: sd 8:0:1:1: Attached scsi generic sg9 type 0
-
Apr 9 15:50:21 localhost multipathd: mpath1: load table [0 524288000 multipath 1 queue_if_no_path 0 1 1 round-robin 0 1 1 8:96 1000]
-
Apr 9 15:50:21 localhost multipathd: mpath1: event checker started
-
Apr 9 15:50:21 localhost multipathd: sdh: add path (uevent)
-
Apr 9 15:50:21 localhost multipathd: mpath1: load table [0 524288000 multipath 1 queue_if_no_path 0 2 1 round-robin 0 1 1 8:96 1000 round-robin 0 1 1 8:112 1000]
-
Apr 9 15:50:21 localhost multipathd: sdi: add path (uevent)
-
Apr 9 15:50:21 localhost multipathd: mpath1: load table [0 524288000 multipath 1 queue_if_no_path 0 2 1 round-robin 0 1 1 8:96 1000 round-robin 0 2 1 8:112 1000 8:1
-
Apr 9 15:50:21 localhost multipathd: sdj: add path (uevent)
-
Apr 9 15:50:21 localhost multipathd: mpath1: load table [0 524288000 multipath 1 queue_if_no_path 0 2 1 round-robin 0 2 1 8:96 1000 8:144 1000 round-robin 0 2 1 8:1
-
Apr 9 15:50:21 localhost multipathd: dm-11: add map (uevent)
-
Apr 9 15:50:21 localhost multipathd: dm-11: devmap already registered
-
Apr 9 15:50:21 localhost multipathd: dm-11: add map (uevent)
-
Apr 9 15:50:21 localhost multipathd: dm-11: devmap already registered
-
Apr 9 15:50:21 localhost multipathd: dm-11: add map (uevent)
-
Apr 9 15:50:21 localhost multipathd: dm-11: devmap already registered
-
Apr 9 15:50:21 localhost multipathd: dm-11: add map (uevent)
-
Apr 9 15:50:21 localhost multipathd: dm-11: devmap already registered
-
- View multipath topology again to see changes after LUNs scanning,
[root@sgbwaprecdb01 ~]# multipath -l
mpath1 (360050768018f032ea0000000000000ce) dm-11 IBM,2145
[size=250G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=0][active]
\_ 7:0:0:1 sdg 8:96 [active][undef]
\_ 8:0:1:1 sdj 8:144 [active][undef]
\_ round-robin 0 [prio=0][enabled]
\_ 7:0:1:1 sdh 8:112 [active][undef]
\_ 8:0:0:1 sdi 8:128 [active][undef]
mpath0 (360050768018f032ea000000000000060) dm-7 IBM,2145
[size=450G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=0][active]
\_ 7:0:0:0 sdc 8:32 [active][undef]
\_ 8:0:1:0 sdf 8:80 [active][undef]
\_ round-robin 0 [prio=0][enabled]
\_ 7:0:1:0 sdd 8:48 [active][undef]
\_ 8:0:0:0 sde 8:64 [active][undef]Tadaaa, new disks have been detected (
/dev/sdg,/dev/sdh,/dev/sdi,/dev/sdj) and mapped to/dev/mapper/mpath1. It's done!
For further details, just read the README file.
{ 2 } Comments
So you have a SVC there. Nice. :)
For adding new disks I always use rescan-scsi-bus.sh utility. It should work on any linux, not depending on the controller.
UsingProbably hp_rescan would work (as it’s just an interface to the QLogic driver). You may find some useful information in the Online Storage Reconfiguration Guide from Red Hat.
Using{ 1 } Trackback
[...] Link: Linux on IBM x3650: Re-scans New LUNs Without Server Reboot [...]
Post a Comment