How to set “max_report_luns” and “max_luns” on CentOS/RHEL 6 to scan more than 512 LUNs
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
目录 返回
首页