Skip to content

Linux on IBM x3650: Re-scans New LUNs Without Server Reboot

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…

  1. Download “Linux Utilities” tarball from http://driverdownloads.qlogic.com/QLogicDriverDownloads_UI/SearchByOs.aspx?ProductCategory=39&OsCategory=2&Os=65&OsCategoryName=Linux
  2. 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
  3. 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
  4. 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]
  5. 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:1

    It’s a good idea to view the syslog to see what is happening,

    1. Apr  9 15:50:21 localhost kernel:   Vendor: IBM       Model: 2145              Rev: 0000
    2. Apr  9 15:50:21 localhost kernel:   Type:   Direct-Access                      ANSI SCSI revision: 04
    3. Apr  9 15:50:21 localhost kernel: SCSI device sdg: 524288000 512-byte hdwr sectors (268435 MB)
    4. Apr  9 15:50:21 localhost kernel: sdg: Write Protect is off
    5. Apr  9 15:50:21 localhost kernel: SCSI device sdg: drive cache: write through w/ FUA
    6. Apr  9 15:50:21 localhost kernel: SCSI device sdg: 524288000 512-byte hdwr sectors (268435 MB)
    7. Apr  9 15:50:21 localhost kernel: sdg: Write Protect is off
    8. Apr  9 15:50:21 localhost kernel: SCSI device sdg: drive cache: write through w/ FUA
    9. Apr  9 15:50:21 localhost kernel:  sdg: unknown partition table
    10. Apr  9 15:50:21 localhost multipathd: sdg: add path (uevent)
    11. Apr  9 15:50:21 localhost kernel: sd 7:0:0:1: Attached scsi disk sdg
    12. Apr  9 15:50:21 localhost kernel: sd 7:0:0:1: Attached scsi generic sg6 type 0
    13. Apr  9 15:50:21 localhost kernel:   Vendor: IBM       Model: 2145              Rev: 0000
    14. Apr  9 15:50:21 localhost kernel:   Type:   Direct-Access                      ANSI SCSI revision: 04
    15. Apr  9 15:50:21 localhost kernel: SCSI device sdh: 524288000 512-byte hdwr sectors (268435 MB)
    16. Apr  9 15:50:21 localhost kernel: sdh: Write Protect is off
    17. Apr  9 15:50:21 localhost kernel: SCSI device sdh: drive cache: write through w/ FUA
    18. Apr  9 15:50:21 localhost kernel: SCSI device sdh: 524288000 512-byte hdwr sectors (268435 MB)
    19. Apr  9 15:50:21 localhost kernel: sdh: Write Protect is off
    20. Apr  9 15:50:21 localhost kernel: SCSI device sdh: drive cache: write through w/ FUA
    21. Apr  9 15:50:21 localhost kernel:  sdh: unknown partition table
    22. Apr  9 15:50:21 localhost kernel: sd 7:0:1:1: Attached scsi disk sdh
    23. Apr  9 15:50:21 localhost kernel: sd 7:0:1:1: Attached scsi generic sg7 type 0
    24. Apr  9 15:50:21 localhost kernel:   Vendor: IBM       Model: 2145              Rev: 0000
    25. Apr  9 15:50:21 localhost kernel:   Type:   Direct-Access                      ANSI SCSI revision: 04
    26. Apr  9 15:50:21 localhost kernel: SCSI device sdi: 524288000 512-byte hdwr sectors (268435 MB)
    27. Apr  9 15:50:21 localhost kernel: sdi: Write Protect is off
    28. Apr  9 15:50:21 localhost kernel: SCSI device sdi: drive cache: write through w/ FUA
    29. Apr  9 15:50:21 localhost kernel: SCSI device sdi: 524288000 512-byte hdwr sectors (268435 MB)
    30. Apr  9 15:50:21 localhost kernel: sdi: Write Protect is off
    31. Apr  9 15:50:21 localhost kernel: SCSI device sdi: drive cache: write through w/ FUA
    32. Apr  9 15:50:21 localhost kernel:  sdi: unknown partition table
    33. Apr  9 15:50:21 localhost kernel: sd 8:0:0:1: Attached scsi disk sdi
    34. Apr  9 15:50:21 localhost kernel: sd 8:0:0:1: Attached scsi generic sg8 type 0
    35. Apr  9 15:50:21 localhost kernel:   Vendor: IBM       Model: 2145              Rev: 0000
    36. Apr  9 15:50:21 localhost kernel:   Type:   Direct-Access                      ANSI SCSI revision: 04
    37. Apr  9 15:50:21 localhost kernel: SCSI device sdj: 524288000 512-byte hdwr sectors (268435 MB)
    38. Apr  9 15:50:21 localhost kernel: sdj: Write Protect is off
    39. Apr  9 15:50:21 localhost kernel: SCSI device sdj: drive cache: write through w/ FUA
    40. Apr  9 15:50:21 localhost kernel: SCSI device sdj: 524288000 512-byte hdwr sectors (268435 MB)
    41. Apr  9 15:50:21 localhost kernel: sdj: Write Protect is off
    42. Apr  9 15:50:21 localhost kernel: SCSI device sdj: drive cache: write through w/ FUA
    43. Apr  9 15:50:21 localhost kernel:  sdj: unknown partition table
    44. Apr  9 15:50:21 localhost kernel: sd 8:0:1:1: Attached scsi disk sdj
    45. Apr  9 15:50:21 localhost kernel: sd 8:0:1:1: Attached scsi generic sg9 type 0
    46. 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]
    47. Apr  9 15:50:21 localhost multipathd: mpath1: event checker started
    48. Apr  9 15:50:21 localhost multipathd: sdh: add path (uevent)
    49. 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]
    50. Apr  9 15:50:21 localhost multipathd: sdi: add path (uevent)
    51. 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
    52. Apr  9 15:50:21 localhost multipathd: sdj: add path (uevent)
    53. 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
    54. Apr  9 15:50:21 localhost multipathd: dm-11: add map (uevent)
    55. Apr  9 15:50:21 localhost multipathd: dm-11: devmap already registered
    56. Apr  9 15:50:21 localhost multipathd: dm-11: add map (uevent)
    57. Apr  9 15:50:21 localhost multipathd: dm-11: devmap already registered
    58. Apr  9 15:50:21 localhost multipathd: dm-11: add map (uevent)
    59. Apr  9 15:50:21 localhost multipathd: dm-11: devmap already registered
    60. Apr  9 15:50:21 localhost multipathd: dm-11: add map (uevent)
    61. Apr  9 15:50:21 localhost multipathd: dm-11: devmap already registered
  6. 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.

Comments

{ 2 } Comments

  1. miljan | April 9, 2010 at 8:34 pm | Permalink
    Using Google Chrome Google Chrome 5.0.342.9 on Linux Linux

    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.

    Using Google Chrome Google Chrome 5.0.342.9 on Linux Linux
  2. Paolo Campegiani | April 9, 2010 at 8:57 pm | Permalink
    Using Mozilla Firefox Mozilla Firefox 3.5.9 on Fedora Linux Fedora Linux

    Probably 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 Mozilla Firefox Mozilla Firefox 3.5.9 on Fedora Linux Fedora Linux

{ 1 } Trackback

  1. Using WordPress WordPress 2.9.2

    […] Link: Linux on IBM x3650: Re-scans New LUNs Without Server Reboot […]

Post a Comment

Your email is never published nor shared. Required fields are marked *