2005-01-11 19:11:50

by Jim Zajkowski

[permalink] [raw]
Subject: Sparse LUN scanning - 2.4.x

Hi there,

We have an Apple Xserve RAID, connected through a FC switch. The RAID
has LUN-masking enabled, such that one of our Linux boxes only gets LUN
1 and not LUN 0. We're running the 2.4.x kernel series now, since this
is under a RHEL envinronment.

The problem is this: since LUN 0 does not show up -- specifically, it
can't read the vendor or model informaton -- the kernel SCSI scan does
not match with the table to tell the kernel to do sparse LUN
scanning... so the RAID does not appear.

I can make the RAID show up by injecting a add-single-device to the
SCSI proc layer. Trivially patching scsi_scan.c to always do sparse
scanning works as well. No hokery with max_scsi_luns or ghost devices
works.

I'm considering making a patch to add a kernel option to force sparse
scanning. Is there a better way?

Thanks in advance,

--Jim

--
Jim Zajkowski OpenPGP 0x21135C3 http://www.jimz.net/pgp.asc
System Administrator 8A9E 1DDF 944D 83C3 AEAB 8F74 8697 A823 2113 5C53
UM Life Sciences Institute





2005-01-12 00:13:36

by Michael Clark

[permalink] [raw]
Subject: Re: Sparse LUN scanning - 2.4.x

Jim Zajkowski wrote:

> Hi there,
>
> We have an Apple Xserve RAID, connected through a FC switch. The RAID
> has LUN-masking enabled, such that one of our Linux boxes only gets
> LUN 1 and not LUN 0. We're running the 2.4.x kernel series now, since
> this is under a RHEL envinronment.
>
> The problem is this: since LUN 0 does not show up -- specifically, it
> can't read the vendor or model informaton -- the kernel SCSI scan does
> not match with the table to tell the kernel to do sparse LUN
> scanning... so the RAID does not appear.
>
> I can make the RAID show up by injecting a add-single-device to the
> SCSI proc layer. Trivially patching scsi_scan.c to always do sparse
> scanning works as well. No hokery with max_scsi_luns or ghost devices
> works.
>
> I'm considering making a patch to add a kernel option to force sparse
> scanning. Is there a better way?
>
Add the Xserve with the BLIST_SPARSELUN flag into the blacklist/quirks
table in drivers/scsi/scsi_scan.c

~mc

2005-01-12 02:13:00

by Jim Zajkowski

[permalink] [raw]
Subject: Re: Sparse LUN scanning - 2.4.x

On 2005-01-11 19:07:53 -0500, Michael Clark <[email protected]> said:

>> The problem is this: since LUN 0 does not show up -- specifically, it
>> can't read the vendor or model informaton -- the kernel SCSI scan does
>> not match with the table to tell the kernel to do sparse LUN
>> scanning... so the RAID does not appear.

> Add the Xserve with the BLIST_SPARSELUN flag into the blacklist/quirks
> table in drivers/scsi/scsi_scan.c

It already is in the quirks list.

The problem is that LUN 0 does not show up on this machine, so the
quirks table doesn't work. Looking at /proc/scsi/scsi shows the device
but only sorta:

> Host: scsi1 Channel: 00 Id: 00 Lun: 00
> Vendor: Model: Rev:
> Type: Processor ANSI SCSI revision: ffffffff

whereas the LUN that is mapped shows up like this:

> Host: scsi1 Channel: 00 Id: 00 Lun: 01
> Vendor: APPLE Model: Xserve RAID Rev: 1.20
> Type: Direct-Access ANSI SCSI revision: 02

So since the information doesn't show up, the quirks table magic
doesn't work since it doesn't know that it needs to do a sparse lun
scan.

--Jim

--
Jim Zajkowski OpenPGP 0x21135C3 http://www.jimz.net/pgp.asc
System Administrator 8A9E 1DDF 944D 83C3 AEAB 8F74 8697 A823 2113 5C53
UM Life Sciences Institute


2005-01-12 09:49:44

by Michael Clark

[permalink] [raw]
Subject: Re: Sparse LUN scanning - 2.4.x

Jim Zajkowski wrote:

> On 2005-01-11 19:07:53 -0500, Michael Clark <[email protected]>
> said:
>
>>> The problem is this: since LUN 0 does not show up -- specifically,
>>> it can't read the vendor or model informaton -- the kernel SCSI scan
>>> does not match with the table to tell the kernel to do sparse LUN
>>> scanning... so the RAID does not appear.
>>
>
>> Add the Xserve with the BLIST_SPARSELUN flag into the
>> blacklist/quirks table in drivers/scsi/scsi_scan.c
>
>
> It already is in the quirks list.
>
> The problem is that LUN 0 does not show up on this machine, so the
> quirks table doesn't work. Looking at /proc/scsi/scsi shows the
> device but only sorta:
>

Okay. I believe there is a patch floating around for 2.4 that is used in
some of the other distro's kernels that adds REPORT LUNS scanning as
well as a flag to force LUN scanning (although not sure it works if LUN
0 is not present).

A pragmatic solution may be to just add the echo scsi add-single-device
x x x x > /proc/scsi/scsi into your early boot or configure one of your
slices on LUN 0 (if the Xserve RAID allows that). 2.6 (and RHEL 4)
support the REPORT LUNS so should work there although there are some
messages on linux-scsi about the Xserve RAID's specific handling of LUN
0. Probably good idea to post to linux-scsi.

~mc