Dynamically discovering Clariion LUNs with Linux


One of the Redhat Enterprise Linux 4 update 3 servers I support had several LUNs added to it this week. The server was using Qlogic 2340 HBAs, which allowed me to use the ql-dynamic-tgt-lun-disc.sh script from the Qlogic support site to dynamically discover the new LUNs:

$ ql-dynamic-tgt-lun-disc.sh

Scanning HOST: host1
....
Scanning HOST: host2
.............
Scanning HOST: host3
....

Found

1:0:0:6
1:0:0:8
1:0:1:6
1:0:1:8
3:0:0:6
3:0:0:8
3:0:1:6
3:0:1:8

After the script completed device discovery, two devices were visible for each LUN (there are multiple paths to the disk storage) in the output of fdisk. To allow use to take advantage of both paths, we needed to create an EMC power device (we are using EMC powerpth instead of dm-mulipath). This was accomplished by running powermt with the “config” option:

$ powermt config

Once the config operation completed, the power device was visible:

$ powermt display dev=emcpoweri

Pseudo name=emcpoweri
CLARiiON ID=APM [Foo]
Logical device ID=0987 [LUN 80 - DS Foo]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP A, current=SP B

< ..... >

And available for general purpose use. I have bumped into numerous kernel bugs in the past that prevented me from dynamically discovering storage, so this was a welcome change. Having used both Qlogic and Emulex adaptors on Solaris and Linux hosts, I think I still prefer Emulex adaptors over Qlogic adaptors.

This article was posted by Matty on 2007-01-13 10:34:00 -0400 -0400