How to set “max_report_luns” and “max_luns” on CentOS/RHEL 7 to scan more than 16,383 LUNs
From CentOS/RHEL 7, the default value of parameter max_report_luns has been increased from 512 to 16383. Consequently, CentOS/RHEL 7.x can now discover more than 511 LUNs when the system scans the SCSI interconnect using the Report LUNs mechanism. Increasing this value beyond 16383 is generally not required. But if you want to increase it, then change the values for either max_report_luns or max_luns in the kernel options line in /etc/default/grub.
Note: The specific kernel option line within /etc/default/grub that needs to be changed starts with GRUB_CMDLINE_LINUX=. Do not edit /boot/grub2/grub.cfg directly.1. Edit the configuration file /etc/default/grub.
2. Add scsi_mod.max_luns to the line GRUB_CMDLINE_LINUX=, as shown below:
# vi /etc/default/grub GRUB_CMDLINE_LINUX=" ... rd.lvm.lv=vg_rhel7/root crashkernel=auto scsi_mod.max_report_luns=xxx ..."
Here replace xxx with your desired value of number of LUNs that the system should detect.
3. Since changes have been made within /etc/default/grub, the grub2 menu files within the boot partition need to be rebuilt:
Rebuild the /boot/grub2/grub.cfg file by running the grub2-mkconfig -o command as follows depending on the machine type:
On BIOS-based machines:
# grub2-mkconfig -o /boot/grub2/grub.cfg
On UEFI-based machines:
# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
4. 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
目录 返回
首页