• 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. UNIX / Linux : How to install and configure mutt
  2. CentOS / RHEL 6 : Lock User Account After N Number of Incorrect Login Attempts
  3. LVM ISCSI Physical Volume Not Available After Server Reboot
  4. mkfs.exfat Command Examples in Linux
  5. Understanding the Network interface configuration file /etc/sysconfig/network-scripts/ifcfg-eth#
  6. atrm Command Examples in Linux
  7. jstest: command not found
  8. top: command not found
  9. How to Use “repoquery” Command to List Package Dependencies
  10. How to Make User Account Read-Only in CentOS/RHEL 7

You May Also Like

Primary Sidebar

Recent Posts

  • aws ec2: CLI for AWS EC2 (Command Examples)
  • aws cur – Create, query, and delete AWS usage report definitions (Command Examples)
  • aws configure – Manage configuration for the AWS CLI (Command Examples)
  • aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright