6

I have a QLogic Fibre Channel card installed in a Debian box (Lenny), and after some tiffs with the firmware, I managed to get the operating system to recognize the card (DKMS driver, and the "firmware-qlogic" package for firmware).

However, for some reason, no block devices are being created for the two SAN volumes being exposed to the unit. They show up when I 'cat /proc/scsi/scsi' but there's no /dev/sdX block device that I can see and further, I have to run the rescan-scsi-bus.sh shell script every time I need to get the /dev/sgX devices back.

How can I get the system to recognize those fibre-channel volumes persistently?

EDIT: Found out that the dual devices being seen are part of the Multipath I/O system we use with our SAN array. Does multipath i/o need to be set up prior to the volumes being recognized as block devices?

tearman
  • 425
  • 1
  • 6
  • 20

1 Answers1

2

Make sure that the devices you see are actually the exposed LUNs and not just the storage subsystem controllers.

Try reading from the sgX device directly. If you're reading from a real disk, you'll see:

# sg_read if=/dev/sg0 bs=512 count=1M mmap=1 time=2
time from second (SCSI) command to end was 3.851212 secs, 139.39 MB/sec
1048576+0 records in, SCSI commands issued: 8192

But a read from an access LUN ought to fail:

# sg_read if=/dev/sg4 bs=512 count=1M mmap=1 time=2
reading: SCSI status: Check Condition
 Fixed format, current;  Sense key: Illegal Request
 Additional sense: Logical block address out of range
  Field replaceable unit code: 5
plus...: Driver_status=0x08 [DRIVER_SENSE, SUGGEST_OK]
sg_read: failed, skip=0
Some error occurred,  remaining block count=1048576
0+0 records in

Can we see the output of lsscsi -g?

If we only see the controllers, I expect something like:

[0:0:0:31]   disk    IBM      Universal Xport  0916  -
[1:0:0:31]   disk    IBM      Universal Xport  0916  -

But if the disks are there as well, you should see something like:

[0:0:0:0]    disk    IBM      1814      FAStT  0916  /dev/sda
[0:0:0:1]    disk    IBM      1814      FAStT  0916  /dev/sdb
[0:0:0:2]    disk    IBM      1814      FAStT  0916  /dev/sdd
[0:0:0:31]   disk    IBM      Universal Xport  0916  -
[1:0:0:0]    disk    IBM      1814      FAStT  0916  /dev/sdc
[1:0:0:1]    disk    IBM      1814      FAStT  0916  /dev/sde
[1:0:0:2]    disk    IBM      1814      FAStT  0916  /dev/sdf
[1:0:0:31]   disk    IBM      Universal Xport  0916  -

You don't need multipath setup before you can see the block devices, but you should set it up before you use them.

Once multipath is setup, you should see something like:

3600a0b8000266f7e000026314950d851 dm-0 IBM,1814      FAStT
[size=100G][features=1 queue_if_no_path][hwhandler=1 rdac]
\_ round-robin 0 [prio=6][active]
 \_ 1:0:0:2 sdf 8:80  [active][ready]
\_ round-robin 0 [prio=1][enabled]
 \_ 0:0:0:2 sdd 8:48  [active][ghost]
MikeyB
  • 38,725
  • 10
  • 102
  • 186
  • Wow, thanks man for the rocking answer. I see the storage controllers but not any storage units themselves. Any idea why I'm not seeing any LUNs if they're configured properly on the controller? – tearman Feb 02 '10 at 16:22
  • Uhhh.... they're not configured properly? :) I'd double-check that you have the controller exposing the LUNs to the right WWPNs. – MikeyB Feb 02 '10 at 16:29
  • Wow, big time moron moment on my part. The LUNs weren't exposed properly. Once that was fixed, everything started working like a charm. Thanks for your help man. – tearman Feb 02 '10 at 20:53