Making RHEL 3 See Multiple LUNS

linux.jpgFor some reason RHEL 3 comes out of the box configured to see only the first Lun on a SCSI channel. This is usually not a problem, as the first Lun is all you care about, but in some instances, you will need to configure the SCSI module to see multiple Luns.

In this case we are using an Adaptec DuraStor 6200S, which is set up to present the RAID controller as Lun 00, and the actual RAID array as Lun 01. Without any modifications to the system, we plug in in, and after a reboot check /proc/scsi/scsi. We can see the RAID controller, but since we can only see the first Lun on the channel, we never get to the array:

Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: Adaptec Model: DuraStor 6200S Rev: V100
Type: Processor ANSI SCSI revision: 03

The actual array would show up as “Channel: 00 Id: 00 Lun: 01″, but it’s not there. To resolve this, we have to first edit “/etc/modules.conf” and add the following line:

options scsi_mod max_scsi_luns=128 scsi_allow_ghost_devices=1

In our case, modules.conf looks like this after the modification:

alias eth0 e1000
alias eth1 e1000
alias scsi_hostadapter megaraid2
alias usb-controller usb-uhci
alias usb-controller1 ehci-hcd
alias scsi_hostadapter1 aic7xxx
options scsi_mod max_scsi_luns=128 scsi_allow_ghost_devices=1

Next we have to build a new initrd image. This is done with the “mkinitrd” command.

WARNING: MAKE DARN SURE you build this against the right kernel (the kernel you want to use). If you are going to replace your current initrd image with the new one, you should make a back-up copy first. The -f option will force or overwrite the current initrd image file.

cp /boot/initrd-2.4.21-47.ELsmp.img /boot/initrd-2.4.21-47.ELsmp.img.bak
mkinitrd -f -v /boot/initrd-2.4.21-47.ELsmp.img 2.4.21-47.ELsmp

Once this is done, you can reboot your machine, and check “/proc/scsi/scsi” to see confirm that it sees the second Lun. You should see something like this:

Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: Adaptec Model: DuraStor 6200S Rev: V100
Type: Processor ANSI SCSI revision: 03

Host: scsi2 Channel: 00 Id: 00 Lun: 01
Vendor: Adaptec Model: DuraStor 6200S Rev: V100
Type: Direct-Access ANSI SCSI revision: 03

Hat Tip: Alan Baker for help figuring this out.
UPDATE: RHEL 4 doest not have this problem.

Discuss This Article


One Response to “Making RHEL 3 See Multiple LUNS”

  1. Wandering Pig Effer on October 19th, 2006 3:12 pm #

    Al Baker rocks.

    That is all.


Got something to say?






Post Tags (user submitted): t (110) - spiralbound net (28) - f (19) - scsi_allow_ghost_devices (15) - mkinitrd rhel (14) - RHEL mkinitrd (12) - scsi_allow_ghost_devices=1 (10) - max_scsi_luns (9) - mkinitrd + scsi (8) - options scsi_mod max_scsi_luns (7) - mount lun (7) - linux multiple LUNs (7) - rhel3 lun (6) - Multi LUN (6) - rhel3 multiple luns (6) - how to check luns in linux (6) - creating LUNs on RAID system (6) - scsi-multi-lun (6) - linux multi lun (5) - rhel4 mkinitrd (5) - scsi_mod max_scsi_luns (5) - show luns linux (5) - MOUNT LUN LINUX (5) - rhel initrd (5) - multiple luns (5) - mkinitrd rhel3 (4) - RHeL 4 mkinitrd (4) - LUN rhel (4) - RHEL 3 USB support (4) - mkinitrd rhel5 (4) - linux multiple lun (4) - max_scsi_luns RHEL (4) - options scsi_mod max_scsi_luns=128 (4) - RHEL3 + mkinitrd (4) - options scsi_mod (3) - linux luns (3) - rhel scsi lun (3) - edit initrd (3) - scsi_mod options (3) - rhel usb disk (3) - lun rhel3 (3) - rhel show disks (3) - max_scsi_luns RHEL 3 (3) - scsi multiple lun (3) - usb to scsi multiple luns (3) - Host Channel Id Lun (3) - linux scsi multiple luns (3) - rhel 5 add lun (3) - rhel lun (3) - rhel5 mkinitrd (3) - max_scsi_luns mkinitrd (3) - alias (3) - mkinitrd scsi vmware (3) - linux usb multiple lun (3) - check lun linux (3) - adaptec multi lUN (3) - aic7xxx LUNs (3) - rhel4 initrd (3) - " luns in LINUX" (3) - multiple luns in RHEL (2) - rhel5 multiple lun support (2) - RHEL + RAID (2) - qla2300 only one lun rhel3 (2) - multiple LUN solaris 10 (2) - rhel (2) - scsi_allow_ghost_devices rhel4 (2) - solaris lun support (2) - mkinitrd rhel 4 (2) - solaris only see first lun (2) - add lun to linux (2) - linux aic7xxx lun option (2) - lun linux (2) - options scsi_mod scsi_allow_ghost_devices=1 (2) - configure LUN linux (2) - rhel mkinitrd command (2) - how to configure multiple LUN support (2) - linux multi luns (2) - max_scsi_luns RHEL3 (2) - qla only sees first lun (2) - linux multiple lun support (2) - max_scsi_luns modules.conf (2) - rhel linux cp overwrite (2) - multiple LUN support solaris (2) - add lun rhel (2) - rhel4 modules.conf (2) - multi luns in RAID 5 (2) - how to mount lun linux (2) - max_scsi_luns rhel4 (2) - usb storage module multiple lun (2) - how to configure raid in rhel3 (2) - linux scsi multiple lun (2) - configure lun in linux (2) - Mount Network Drive RHEL (2) - solaris (2) - Multiple Lun Support Linux (2) - all (2) - scsi_allow_ghost_devices RHEL 4 (2) - RHEL mount usb (2) - mkinitrd rhel 5 (2) - configuring LUNs in solaris (2) - seeing luns on linux (2) - rhel alias scsi_hostadapter (2) - LUN in Solaris (2) - solaris scsi multiple lun (2) - edit initrd rhel3 (2) - RHEL multi lun support (2) - RHEL Multiple LUNs (2) - 2 luns linux mount (2) - Configuring lun on RHEL 3 (2) - multi lun support (2) - mkinitrd 2 4 21-47 (2) - rhel create initrd (2) - how to mount network drive rhel4 (2) - linux max_scsi_luns (2) - linux kernel multiple lun support (2) - mount lun in linux (2) - RHEL AS 3 mkinitrd (2) - how to mount luns in linux (2) - check max_scsi_luns (2) - multiple scsi_hostadapter (2) - creating luns in linux (2) - adaptec multiple luns (2) - multiple disks on one usb only seeing one disk (2) - support multiple SCSI luns on Linux (2) - RHEL5 1 mkinitrd (2) - rhel edit initrd (2) - RHEL4 enable multiple LUNS (2) - how to check lun in solaris (2) - rhel scsi multi lun (2) - rhel4 initrd mounten (2) - luns in rhel (2) - rhel 3 mkinitrd (2) - rhel3 initrd (2) - linux show luns (2) - rhel multiple lun support (2) - increasing LUN support for RHEL 5 (2) - linux lun support (2) - rhel4 mkinitrd modules (2) - linux luns adaptec rhel4 (2) - Durastor 6200s (2) - Creating LUNs (2) - 2 4 kernel and multi lun support (2) - rhel show luns (2) - vmware multi lun (2) - mkinitrd luns (2) - rhel lun support (2) - mkinitrd rhel modules (2) - rhel4 multilun (2) - modules conf linux max_scsi_luns (2) - how to mount usb storage on rhel2 (2) -