• 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 have 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: