Wednesday, January 1, 2014

How do I setup multiple LUNs on Red Hat Enterprise Linux?


Bottom of Form
 Issue
  • How do I setup multiple LUNs on Red Hat Enterprise Linux?
  • receive message "kernel: scsi: On host 3 channel 0 id 1 only 511 (max_scsi_report_luns) of 522 luns reported, try increasing max_scsi_report_luns"
  • need to see more than 511 luns
  • how do I configure max_luns and max_report_luns for the scsi_mod kernel module?
  • In releases prior to RHEL 6 the scsi_mod module parameters such as, max_luns and max_report_luns could be changed by modifying /etc/modprobe.conf, how do I do the same in RHEL 6?

Resolution
  • There is a parmeter of SCSI core module to control the number of multiple LUNs.
  • Listed below are the steps to configure multiple LUNs.
For Red Hat Enterprise Linux 3, 4, 5

  1. Modify the kernel module configuration file.
In Red Hat Enterprise Linux 3, you need modify /etc/modules.conf, please add the following line.
options scsi_mod max_scsi_luns=xxx
In Red Hat Enterprise Linux 4 and Red Hat Enterprise Linux 5, /etc/modprobe.conf is used.
options scsi_mod max_luns=xxx
  1. Build the initial ramdisk to implement the change
  2. # mkinitrd -f /boot/newimage-2.6.xx 2.6.xx
(add the exact kernel version you have in place of xx)
  1. Reboot the system. After the reboot, the LUNs should appear.
For Red Hat Enterprise Linux 6
  1. scsi_mod is now built in to the kernel and is no longer a loadable module as in prior versions. Therefore module options cannot be changed in RHEL 6 by adding a .conf file entry within the /etc/modprode.d directory. Settings should go on the kernel command line. Append the following to your grub.conf 'kernel' line:
  2. scsi_mod.max_luns=xxx
  3. Note that some new arrays also require the report luns entry value be set. If so, also append it to your grub.conf kernel line:
  4. scsi_mod.max_report_luns=xxx
  5. Reboot the system. After the reboot, the LUNs should appear.
Diagnostic Steps
  • The default setting for lpfc.lpfc_max_luns (Emulex HBAs) is 255. This can be checked with the following command.
# cat /sys/module/lpfc/parameters/lpfc_max_luns
255
  • The default setting for qla2xxx.ql2xmaxlun is 65535. This can be checked with the following command (RHEL5 and above only).
# cat /sys/module/qla2xxx/parameters/ql2xmaxlun
65535
  • The default setting for scsi_mod.max_luns (SCSI mid layer) is 512. This can be checked with the following command.

# cat /sys/module/scsi_mod/parameters/max_luns

512

No comments:

Post a Comment