• Making RHEL 3 See Multiple LUNS

    For 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.

    This entry was posted on Monday, October 16th, 2006 at 10:38 am and is filed under Data and Technology. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
  • 2 Comments

    Take a look at some of the responses we've had to this article.

    1. Al Baker rocks.

      That is all.

    2. very nice now days its really tough to find usefull informaiton thank you again for all your tips

  • Leave a Reply

    Let us know what you thought.

  • Name (required):

    Email (required):

    Website:

    Message:

Visitors have tagged this post: t (110) - scsi_allow_ghost_devices (44) - mkinitrd rhel (34) - RHEL mkinitrd (30) - spiralbound net (28) - alias (20) - f (19) - scsi_mod max_scsi_luns (17) - scsi_allow_ghost_devices=1 (16) - MOUNT LUN LINUX (14) - rhel4 mkinitrd (13) - mount lun (12) - how to check luns in linux (11) - max_scsi_luns (11) - rhel5 mkinitrd (11) - options scsi_mod max_scsi_luns=128 (10) - rhel initrd (10) - options scsi_mod max_scsi_luns (10) - linux mount LUN (10) - mkinitrd rhel3 (9) - mkinitrd rhel5 (9) - linux multiple LUNs (8) - Multi LUN (8) - mkinitrd + scsi (8) - array (7) - linux multi lun (7) - rhel3 lun (7) - how to check lun in solaris (7) - mount lun in linux (7) - show luns linux (7) - linux show luns (7) - rhel lun (7) - Host Channel Id Lun (7) - multiple luns (6) - rhel3 multiple luns (6) - scsi-multi-lun (6) - how to mount lun linux (6) - linux show lun (6) - creating LUNs on RAID system (6) - linux multiple lun (5) - options scsi_mod (5) - rhel show luns (5) - max_scsi_luns RHEL (5) - mkinitrd rhel4 (5) - LUN rhel (5) - how to check LUN in linux (5) - show lun linux (5) - rhel max_scsi_luns (5) - RHEL3 + mkinitrd (4) - configure LUN linux (4) - linux multi luns (4) - rhel4 initrd (4) - RHeL 4 mkinitrd (4) - linux luns (4) - linux max_scsi_luns (4) - RHEL 3 USB support (4) - mkinitrd scsi vmware (4) - add lun to linux (4) - how to mount a LUN in linux (4) - how to mount luns in linux (4) - rhel3 mkinitrd (4) - multiple scsi_hostadapter (3) - scsi_mod options (3) - rhel scsi lun (3) - linux scsi multi lun (3) - multiple lun support (3) - mkinitrd rhel 4 (3) - configure lun in linux (3) - Multiple Lun Support Linux (3) - max_scsi_luns mkinitrd (3) - adaptec multi lUN (3) - rhel usb disk (3) - max_scsi_luns RHEL 3 (3) - linux scsi multiple luns (3) - scsi_allow_ghost_devices rhel4 (3) - max_scsi_luns RHEL3 (3) - rhel3 scsi lun (3) - " luns in LINUX" (3) - linux usb multiple lun (3) - aic7xxx LUNs (3) - scsi multiple lun (3) - check lun linux (3) - check max_scsi_luns (3) - edit initrd (3) - lun rhel3 (3) - modules.conf max_scsi_luns (3) - max_scsi_luns rhel4 (3) - rhel 5 add lun (3) - rhel show disks (3) - multi lun support (3) - mount luns (3) - mkinitrd rhel 5 (3) - rhel3 initrd (3) - initrd rhel 3 (3) - max_scsi_luns rhel5 (3) - Mount Network Drive RHEL (3) - mounting luns linux (3) - usb to scsi multiple luns (3) - solaris show luns (3) - Create Lun Linux (3) - mount linux lun (3) - how to mount luns (3) - linux lun check (3) - linux scsi \"multiple lun\ (3) - rhel3 multi lun (3) - RHEL AS3 and LUN handling (3) - solaris (2) - rhel (2) - all (2) - scsi_allow_ghost_devices RHEL 4 (2) - rhel 3 mkinitrd (2) - mkinitrd luns (2) - adaptec multiple luns (2) - RHEL AS 3 mkinitrd (2) - solaris 10 multi LUN (2) - Mount multiple LUNS (2) - rhel alias scsi_hostadapter (2) - solaris scsi multiple lun (2) - edit initrd rhel3 (2) - RHEL multi lun support (2) - RHEL Multiple LUNs (2) - RHEL3 max_scsi_luns (2) - linux kernel multiple lun support (2) - rhel scsi multi lun (2) - rhel4 initrd mounten (2) - rhel3 modules.conf (2) - how to configure LUN in linux (2) - multiple luns in RHEL (2) - rhel3 multiple lun (2) - rhel lun support (2) - linux multiple lun support (2) - rhel4 modules.conf (2) - RHEL + RAID (2) - RHEL mount usb (2) - options scsi_mod scsi_allow_ghost_devices=1 (2) - how to configure raid in rhel3 (2) - linux aic7xxx lun option (2) - solaris lun support (2) - usb storage module multiple lun (2) - rhel mount lun (2) - max_scsi_luns modules.conf (2) - check luns linux (2) - linux lun aliasing (2) - rhel multiple lun support (2) - rhel 5 multiple lun support (2) - creating luns in linux (2) - multiple disks on one usb only seeing one disk (2) - support multiple SCSI luns on Linux (2) - how to configure multiple LUN support (2) - add lun rhel (2) -