LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-22-2003, 10:10 AM   #1
niverson
Member
 
Registered: Jun 2003
Location: Colorado
Distribution: Fedora Core 4
Posts: 128

Rep: Reputation: 15
SPARSE LUNS, SCSI, Qlogic 2342, RedHAt 9.0


Does anyone know how to configure a linux kernel to detect sparse luns in RedHat 9.0? I have a SCSI device that 4 luns(0,1,3,16) and RedHat is only detecting the first 2. Additionally, The Qlogic driver that was shipped in the RH9 distribution is not allowing 16-byte CDB's. I have checked the SCSI Generic source code and found a #define for the maximum CDB size to be 16. Where else should I look to find the restriction?

Thanks,
Nate
 
Old 09-24-2003, 11:11 AM   #2
niverson
Member
 
Registered: Jun 2003
Location: Colorado
Distribution: Fedora Core 4
Posts: 128

Original Poster
Rep: Reputation: 15
I found the answer I needed to fix the sparse lun issue.

1. cat /proc/scsi/scsi

find the device that has the sparse luns and get the vendor and model data.

2. edit /usr/src/linux-2.4/drivers/scsi/scsi_scan.c so that
static struct dev_info device_list[] has the following entry in it.

{"vendor", "model", "*", BLIST_SPARSELUN | BLIST_LARGELUN},

3. rebuild module/kernel


Real example follows:

My /proc/scsi/scsi showed this, which only shows LUN 0 and 1 --- it is missing 3 and 16.
> Host: scsi0 Channel: 00 Id: 00 Lun: 00
> Vendor: Pillar Model: Axiom 500 Rev: 0000
> Type: Direct-Access ANSI SCSI revision: 05
> Host: scsi0 Channel: 00 Id: 00 Lun: 01
> Vendor: Pillar Model: Axiom 500 Rev: 0000
> Type: Direct-Access ANSI SCSI revision: 05


Line I added to static struct dev_info device_list[] in /usr/src/linux-2.4/drivers/scsi/scsi_scan.c


{"Pillar", "Axiom 500", "*", BLIST_SPARSELUN | BLIST_LARGELUN},

I added this line right before the last entry which is {NULL, NULL, NULL}

I now see all 4 LUNs. Special thanks to Michael Clark.

Nate
 
Old 09-25-2003, 10:20 AM   #3
niverson
Member
 
Registered: Jun 2003
Location: Colorado
Distribution: Fedora Core 4
Posts: 128

Original Poster
Rep: Reputation: 15
One other note. For SCSI in lk 2.4, the maximum default cdb size is 12. This value can be overridden in the individual driver or can be changed in usr/src/linux-2.4/drivers/scsi/hosts.c by replacing retval->max_cmd_len = 12; with retval->max_cmd_len = 16;.
If you have legacy SCSI devices that don't support 16 byte cdb's you should override the value in the individual driver and leave the default as 12 in host.c.

Nate
 
Old 12-23-2004, 11:13 AM   #4
dlethe
LQ Newbie
 
Registered: Dec 2004
Location: Texas
Distribution: Many
Posts: 2

Rep: Reputation: 0
For what it's worth ... LINUX 2.6.5 kernel with the same qlogic drivers support 16-byte CDBs. I tested on both 32-bit and ia64-bit distributions. Other kernels may work, but even after trying some patches to 2.4 kernels, I never got it to work.

Note also that you have to make sure your driver supports 16-byte CDBs.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fdisk Failure On New Luns From Eva3000 Redhat lvdi744 Red Hat 0 11-23-2005 04:00 AM
Issue with FC3 and Qlogic SCSI install vinoloco Fedora 1 03-14-2005 12:29 PM
sparse array in java lado Programming 4 12-18-2004 04:48 AM
SCSI generic, RedHat 9.0, Qlogic Fibre Channel card niverson Linux - Hardware 2 07-12-2003 01:15 PM
QLogic FC + Redhat 8 paradox606 Linux - Hardware 1 06-16-2003 12:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration