Operating System - Linux
1826242 Members
3064 Online
109692 Solutions
New Discussion

Linux AS2.1 - after initial install not seeing other luns sdb or sdc

 
SOLVED
Go to solution
Edward M. Hoppe, Jr.
Occasional Contributor

Linux AS2.1 - after initial install not seeing other luns sdb or sdc

Using a diskless HP LPr booting directly from a SAN storage device (Qlogic HBA & XIOtech), I've successfully installed AS2.1 yet sfdisk cannot see the other 2 drives. I've 'zoned / given ownership' of 3 drives to the HBA/server yet it sees only 1 of the 3 drives. What Linux commands are required so that the OS can see these other drives so I can create additional mount points & file systems other than the core OS guys?
2 REPLIES 2
Stuart Browne
Honored Contributor

Re: Linux AS2.1 - after initial install not seeing other luns sdb or sdc

I remember reading a post here some time ago about a very similar issue. If I recall correctly, it is because RedHat (out-of-the-box) do not enable Multi-LUN on SCSI devices.

A quick scan of the kernel code, and there is a configurable option called 'CONFIG_SCSIP_MULTI_LUN' of which sounds about right.

The inline-help states the following:

If you have a SCSI device that supports more than one LUN (Logical Unit Number), e.g. a CD jukebox, and only one LUN is detected, you can say Y here to force the SCSI driver to probe for multiple LUNs.
A SCSI device with multiple LUNs acts logically like multiple SCSI devices. The vast majority of SCSI devices have only one LUN, and so most people can say N here and should in fact do so, because it is safer.

This sounds like your issue.
One long-haired git at your service...
Thilo Knoch
Frequent Advisor
Solution

Re: Linux AS2.1 - after initial install not seeing other luns sdb or sdc

The basic problem is that the default maximum lun number in the high level scsi driver is 1.
If you type lsmod and you see a module named scsi_mod then the scsi high level driver is compiled as module, if not, it is compiled into the kernel.

If the scsi hl driver is a module:

Then you have to append the following line to /etc/modules.conf
options scsi_mod max_scsi_luns=3

This would be enough, when the driver would be loaded after boot.

But in this case the the driver is loaded at boot time and you will not be able to unload/reload this module because it is in use by the root filesystem.
So you have to build a new initrd too.
take the result of
uname -r
this will be the kernel version for instance:
2.4.18-10smp

then execute
mkinitrd /boot/initrd-2.4.18-10smp3luns.img 2.4.18-10smp
This generates a new INITial Ram Disk and uses the parameters from /etc/modules.conf.

If you are using lilo:
Duplicate the appropriate section in /etc/lilo.conf and customize it.
This should look like

image=/boot/vmlinuz-2.4.18-10smp
label=linux3luns
initrd=/boot/initrd-2.4.18-10smp3luns.img
read-only
root= ...

And run lilo from the command line.
Reboot and select linux3luns.

If you are using grub you have to customize the /boot/grub.conf. Duplicate the appropriate section and customize it:
title RHAS 3 LUNS
root (hd0,0)
kernel /vmlinuz-2.4.18-10smp ro root=...
initrd /initrd-2.4.18-10smp3luns.img

Reboot and select the newly created entry.

If the scsi hl driver is compiled into the kernel:
You can try to add at the boot prompt
max_scsi_luns=3
If this does not work, you have probably to build a new kernel with the
"CONFIG_SCSI_MULTI_LUN=y" option first.