I have a Dell 2300 running RedHat 7.1 with the 2.4.3 kernel. We are
using a qlogic QLA2200 FC card to connect to a Zzyzx RocketStor Raid array.
The Zzyzx array has two FC ports which appear as two targets on the SAN and
can assign raid sets to arbitrary Lun numbers on either port. The problem we
observed is that the Linux host could not see any of the raid sets on a
given port unless the raid sets were assigned to sequential Luns starting at
0. Furthermore, if there was a gap in the Luns, the Linux host could not see
any of the raid sets past the gap. For example, if we deleted the raid set
assigned to Lun 3, all of the raid sets with a Lun higher than 3 would
"disappear" from the Linux host. I modified the blacklist in scsi_scan.c and
added the following entry:
{"Zzyzx", "RocketStor 500S", "*", BLIST_SPARSELUN}
After this change, the host could see non-sequential Luns provided
that a raid set was also mapped to Lun 0. A bit of investigation revealed
that the scan_scsis_single subroutine was exiting on scanning Lun 0 at an
error test (near line 532) before the call to get_device_flags.
Consequently, if no device is mapped to Lun 0, then the BLIST_SPARSELUN flag
is never set and the remaining Luns do not get scanned. At a loss for a
better solution, I added a new flag BLIST_FORCESCAN to ignore the error
tests and I moved the call to get_device_flags before the error tests.
This works great, but is perhaps inelegant. Other ideas? Attached is a diff:
Thanks,
-poul
Poul E.J. Petersen
Rogue Wave Software
--- /archive/Sys/Kernels/linux-2.4.3/drivers/scsi/scsi_scan.c Sun Feb 4
10:05:30 2001
+++ ./scsi_scan.c Mon Jun 18 18:03:16 2001
@@ -38,6 +38,7 @@
#define BLIST_MAX5LUN 0x080
#define BLIST_ISDISK 0x100
#define BLIST_ISROM 0x200
+#define BLIST_FORCESCAN 0x400 // This forces a scan even if errors
static void print_inquiry(unsigned char *data);
static int scan_scsis_single(int channel, int dev, int lun, int
*max_scsi_dev,
@@ -146,6 +147,7 @@
{"SONY", "TSL", "*", BLIST_FORCELUN}, // DDS3 & DDS4
autoloaders
{"DELL", "PERCRAID", "*", BLIST_FORCELUN},
{"HP", "NetRAID-4M", "*", BLIST_FORCELUN},
+ {"Zzyzx", "RocketStor 500S", "*", BLIST_FORCESCAN |
BLIST_SPARSELUN},
/*
* Must be at end of list...
@@ -523,7 +525,13 @@
SCSI_LOG_SCAN_BUS(3, printk("scsi: INQUIRY %s with code 0x%x\n",
SRpnt->sr_result ? "failed" : "successful",
SRpnt->sr_result));
- if (SRpnt->sr_result) {
+ /*
+ * Get any flags for this device.
+ */
+
+ bflags = get_device_flags (scsi_result);
+
+ if (SRpnt->sr_result && ! (bflags & BLIST_FORCESCAN)) {
scsi_release_request(SRpnt);
return 0; /* assume no peripheral if any sort of error
*/
}
@@ -532,16 +540,10 @@
* Check the peripheral qualifier field - this tells us whether LUNS
* are supported here or not.
*/
- if ((scsi_result[0] >> 5) == 3) {
+ if ((scsi_result[0] >> 5) == 3 && ! (bflags & BLIST_FORCESCAN)) {
scsi_release_request(SRpnt);
return 0; /* assume no peripheral if any sort of error
*/
}
-
- /*
- * Get any flags for this device.
- */
- bflags = get_device_flags (scsi_result);
-
/* The Toshiba ROM was "gender-changed" here as an inline hack.
This is now much more generic.
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]