Skip to contentSkip to conversation

Problem created by Zoning on Linux

DISCUSSION chandrasekhar.nagaraj 3 participants 3 messages Mar 31, 2003

lore
Share & tools
lore
#0 lore raw

Hi,
We are trying to create zoning (IO fencing) on our storage device. The zoning is to be done on the LUN basis, so that a particular HBA will accesses the only those LUNs which are assigned to it.

We have two HBA cards residing on different Hosts.

We have created 8 LUNs (from 0 to 7).
Now we want to give access to only 4 LUNs from each HBA card.

So we have given access to LUN 0 to 3 from HBA card 1. Also LUN 4 to 7 is to be accessed from HBA card 2.

When we did the above, we observed that the Host, which has access to LUN 0 to 3, is working fine. i.e. its /proc/scsi/scsi is showing entries corresponding to LUN 0 to 3. Also 4 scsi devices are created & can be viewed in /proc/partitions.

But the second Host, which should have access to LUN 4 to 7, has some problem.
The /proc/partitions does not show any scsi device file. Also /proc/scsi/scsi does not entries corresponding to LUN 4 to 7; but it have only one entry corresponding to LUN 0 (which should not be allowed).

So, is there any restriction on Linux that the LUN number should start with 0 only??
If so, then what is the solution/workaround?

Thanks and Regards
Chandrasekhar

#1 lore raw
Quoted 6 lines · chandrasekhar.nagaraj

Hi,
We are trying to create zoning (IO fencing) on our storage device. The zoning is to be done on the LUN basis, so that a particular HBA will accesses the only those LUNs which are assigned to it.

We have two HBA cards residing on different Hosts.

Hi,
We've used Linux to access our cx600 and there were no problems. One thing to keep in mind is that you are only allowed to have a single initiator per zone, otherwise you will run into problems. When you create your zones make sure that each zone only has a single HBA in it...

Also, on your switch, look at the error counters. If there are any number of CRC errors it may mean a bad cable.

What is the FC card and driver you are currently using?

Regards
James Bourne

Quoted 32 lines

We have created 8 LUNs (from 0 to 7).
Now we want to give access to only 4 LUNs from each HBA card.

So we have given access to LUN 0 to 3 from HBA card 1. Also LUN 4 to 7 is to be accessed from HBA card 2.

When we did the above, we observed that the Host, which has access to LUN 0 to 3, is working fine. i.e. its /proc/scsi/scsi is showing entries corresponding to LUN 0 to 3. Also 4 scsi devices are created & can be viewed in /proc/partitions.

But the second Host, which should have access to LUN 4 to 7, has some problem.
The /proc/partitions does not show any scsi device file. Also /proc/scsi/scsi does not entries corresponding to LUN 4 to 7; but it have only one entry corresponding to LUN 0 (which should not be allowed).

So, is there any restriction on Linux that the LUN number should start with 0 only??
If so, then what is the solution/workaround?

Thanks and Regards
Chandrasekhar

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 5 lines
James Bourne                  | Email:            [email protected]          
Unix Systems Administrator    | WWW:           http://www.hardrock.org
Custom Unix Programming       | Linux:  The choice of a GNU generation
----------------------------------------------------------------------
 "All you need's an occasional kick in the philosophy." Frank Herbert  
#2 lore raw
In reply to chandrasekhar.nagaraj
Quoted 9 lines · chandrasekhar.nagaraj [[email protected]] wrote:

But the second Host, which should have access to LUN 4 to 7, has some problem.
The /proc/partitions does not show any scsi device file. Also /proc/scsi/scsi does not entries corresponding to LUN 4 to 7; but it have only one entry corresponding to LUN 0 (which should not be allowed).

So, is there any restriction on Linux that the LUN number should start with 0 only??
If so, then what is the solution/workaround?

You did not mention the kernel version you are working with, but I will assume that it is 2.4 based (2.5 supports report_luns and should avoid this problem).

The failure looks like you need to set a sparse lun flag for this storage device. Add an entry with the BLIST_SPARSELUN flag set to the device_list array in scsi_scan.c for this storage device.

If the scanning is happening post boot you could turn on some scan logging to verify this issue.
echo "scsi log scan 4" > /proc/scsi/scsi
You can set logging during boot, but you can only control all logging or none and it sometimes generates to much output.

-andmike
--
Michael Anderson
[email protected]