• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to set “max_report_luns” and “max_luns” on CentOS/RHEL 6 to scan more than 512 LUNs

by admin

The default limit of maximum luns that can be presented in a CentOS/RHEL 6 is 512. But in many cases, you may want to increase this limit. There is a parameter of the SCSI core module to control the number of multiple LUNs.

View Current Settings

To view the current setting of “max_luns” parameter, use the below command:

# systool -v -m scsi_mod
Module = "scsi_mod"

  Attributes:
    uevent              = 

  Parameters:
    default_dev_flags   = "0"
    eh_deadline         = "-1"
    inq_timeout         = "20"
    max_luns            = "512"
    scan                = "async"
    scsi_logging_level  = "0"
    use_blk_mq          = "Y"

You may also view the file /sys/module/scsi_mod/parameters/max_luns, to view the current settings:

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

Change the max_report_luns parameter

1. In order to change the values for either max_report_luns or max_luns, append the following to your grub.conf ‘kernel‘ line:

# vi /boot/grub/grub.conf 
 kernel /vmlinuz-2.6.32-71.el6.x86_64 ro root=/dev/mapper/vg_rhel60-lv_root 
    rd_LVM_LV=vg_rhel60/lv_root rd_LVM_LV=vg_rhel60/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM 
    LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto 
    rhgb quiet scsi_mod.max_report_luns=[yourvalue] scsi_mod.max_luns=[yourvalue]

Here specify the number of max lunx you want the system to scan. You can specify a large number such as 2048 or 4096 etc.

2. Reboot the system. After the reboot, the additional LUNs should appear. The changes will be persistent across reboots.

# shutdown -r now

Verfiy

Once the system is up after reboot use any of the below commands to verify the settings once again.

# cat /sys/module/scsi_mod/parameters/max_luns
# cat /sys/module/scsi_mod/parameters/max_report_luns
# systool -v -m scsi_mod

Filed Under: CentOS/RHEL, CentOS/RHEL 6, Linux

Some more articles you might also be interested in …

  1. swapon and swapoff Command Examples in Linux
  2. How to get Fibre Channel HBA information from Linux SOSreport
  3. How to clean YUM cache in CentOS / RHEL
  4. Understanding dm-Multipath Identifiers in Linux
  5. CentOS / RHEL 6 : Install and Configure SNMPv3
  6. Sample /etc/kdump.conf configuration file
  7. How to change the interface name in CentOS/RHEL 8 using prefixdevname
  8. vncserver fails with “Starting VNC server: no displays configured”
  9. Repairing filesystem issues at Boot in CentOS/RHEL 7 and 8
  10. How to disable IPv6 on CentOS / RHEL 5

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright