Getting 'blk_cloned_rq_check_limits: over max size limit' errors after updating the systems to kernel 2.6.32-642.el6 or later
Environment
- Red Hat Enterprise Linux 6.8, 7.3
okernel-2.6.32-642.el6or later
okernel-3.10.0-327.el7or later - IBM GPFS version earlier than
4.1.1.8,4.2.1.
Issue
-
After updating the system to
kernel-2.6.32-642.el6or later, there are following errors getting logged and this is causing dm-multipath path failures:Jun 14 09:33:38 testhost kernel: blk_cloned_rq_check_limits: over max size limit. Jun 14 09:33:38 testhost kernel: blk_cloned_rq_check_limits: over max size limit. Jun 14 09:33:38 testhost kernel: blk_cloned_rq_check_limits: over max size limit. Jun 14 09:33:38 testhost kernel: blk_cloned_rq_check_limits: over max size limit. Jun 14 09:33:38 testhost kernel: blk_cloned_rq_check_limits: over max size limit. Jun 14 09:33:38 testhost kernel: blk_cloned_rq_check_limits: over max size limit. Jun 14 09:33:38 testhost kernel: blk_cloned_rq_check_limits: over max size limit. Jun 14 09:33:38 testhost kernel: blk_cloned_rq_check_limits: over max size limit. Jun 14 09:33:38 testhost kernel: device-mapper: multipath: Failing path 70:64. Jun 14 09:33:38 testhost kernel: device-mapper: multipath: Failing path 71:80. Jun 14 09:33:38 testhost multipathd: 70:64: mark as failed Jun 14 09:33:38 testhost multipathd: nsd_crs_04: remaining active paths: 1 Jun 14 09:33:38 testhost multipathd: 71:80: mark as failed [...]
Resolution
-
IBM GPFS filesystem for use with RHEL 6.8 from version
4.1.1.8and4.2.1erroneously reports this as fixed..
This has now been confirmed by IBM in fact not to be the case. Currently IBM GPFS team members are still working on this issue.
This issue remains an issue for GPFS filesystem deployments and will require the workaround documented in Resolution section.Given the stacking nature of DM multipath (where DM multipath layers ontop of all the individual underlying SCSI devices) the proper place to modify the
max_sectors_kbparameter is at the underlying SCSI devices.
Workaround 1:
- Use the steps described in following article to increase the
max_sectors_kboption for multipath devices and its sub paths to 4096:
How to set custom 'max_sectors_kb' option for devices under multipathd control?
Workaround 2:
(without using the updated device-mapper-multipath rpms as described in Workaround 1)
-
Use following udev rule to increase
max_sectors_kbvalue for underlying sub paths to the SAN devices, this should help us to make sure thatrequest_queuelimits are not violated:-
Create a new udev rule file
/etc/udev/rules.d/99-custom.ruleswith the following content:ACTION!="add|change", GOTO="rule_end" ENV{ID_VENDOR}=="NETAPP*", RUN+="/bin/sh -c 'echo 4096 > /sys%p/queue/max_sectors_kb'" LABEL="rule_end"Note: Replace
NETAPPin above line with name of the vendor of SAN devices in your setup/environment. -
If the system is not configured to boot from SAN, then this step can be skipped.
For boot from SAN systems, please also rebuild the initial ram disk image with following commands so that initramfs image will have above udev rule file to set `max_sectors_kb` limit during early stage in boot process when multipath devices are created: First take a backup of current initramfs image: $ cp -av /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak Rebuild the initramfs image with udev rule file included: $ dracut -f -v -i /etc/udev/rules.d/99-custom.rules /etc/udev/rules.d/99-custom.rules- Once above udev rule is added, please try to reboot the system and this error messages should no longer occur.
-
Root Cause
-
The error messages
blk_cloned_rq_check_limits: over max size limitare logged from the following code block inblk_cloned_rq_check_limits:block/blk-core.c 1870 static int blk_cloned_rq_check_limits(struct request_queue *q, 1871 struct request *rq) 1872 { 1873 if (blk_rq_sectors(rq) > blk_queue_get_max_sectors(q, rq->cmd_flags)) { 1874 printk(KERN_ERR "%s: over max size limit.\n", __func__); 1875 return -EIO; <---------- 1876 } [...] -
The check in above snip calls
blk_rq_sectorsto verify number of sectors in cloned request and compare it withmax_discard_sectorsormax_sectorslimits for therequest_queue. If it finds that number of sectors in cloned request are more thanmax_discard_sectorsormax_sectorslimits for therequest_queue, then we print error and return IO error (-EIO) The check marked in aboveblk_cloned_rq_check_limitsfunction was added in RHEL 6.8, 7.3 kernels through following commits:Upstream commit bf4e6b4e757488dee1b6a581f49c7ac34cd217f8 block: Always check queue limits for cloned requests -
Since the cloned request was violating the request_queue limits, kernel had reported
blk_cloned_rq_check_limits: over max size limiterrors. This subsequently resulted in path failure in multipath.Above patch was not present in the kernel versions older than
2.6.32-642.el6,3.10.0-327.el7, due to which the same request queue limit violations were not resulting IO failures with old kernels.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.