Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1406452

Summary: iostat -N does not display all logical volumes
Product: Red Hat Enterprise Linux 6 Reporter: John Pittman <jpittman>
Component: sysstatAssignee: Michal Sekletar <msekleta>
Status: CLOSED CURRENTRELEASE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: urgent    
Version: 6.8CC: bbreard, fkrska, jherrman, jkejda, mpoole, msekleta, ovasik, qe-baseos-apps, toneata
Target Milestone: rcKeywords: FastFix, Patch, ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
On systems with a large number of logical volumes (LVs), the "iostat -N" command in some cases did not display all LVs on the system. With this update, the underlying code has been fixed, and "iostat -N" now displays correct information about the system LVs.
Story Points: ---
Clone Of:
: 1512573 (view as bug list) Environment:
Last Closed: 2018-06-21 08:42:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1461138, 1494481, 1512573    
Attachments:
Description Flags
Patch to lookup major/minor numbers correctly none

Description John Pittman 2016-12-20 15:00:52 UTC
Description of problem:

When system has a large number of logical volumes, when checking output of iostat -N, all volumes are not displayed.

Version-Release number of selected component (if applicable):

kernel-2.6.32-642.11.1.el6.x86_64
lvm2-2.02.143-7.el6_8.1.x86_64
device-mapper-1.02.117-7.el6_8.1.x86_64
sysstat-9.0.4-31.el6.x86_64

How reproducible:

- Create logical volumes, format, and mount:

[root@localhost ~]# for i in {1..435} ; do lvcreate -n lvol$i -L 1M testvg ; done
[root@localhost ~]# for i in {1..435}; do mkdir /test$i ; done
[root@localhost ~]# for i in {1..435} ; do mkfs.ext4 /dev/mapper/testvg-lvol$i ; done
[root@localhost ~]# for i in {1..435} ; do mount /dev/mapper/testvg-lvol$i /test$i ; done

- Check counts for each command:

[root@localhost ~]# dmsetup ls | grep testvg | wc -l
435

[root@localhost ~]# lvs | grep testvg | wc -l
435

[root@localhost ~]# iostat | grep dm- | wc -l  <=== root and swap are dm devices
437

[root@localhost ~]# iostat -N | grep testvg | wc -l  <=== only 255 devices showing
255

Highest number of results I could get is 256.  

Expected results:

iostat -N should report all expected devices.

Comment 1 John Pittman 2016-12-20 15:28:23 UTC
Issue does not seem to exist in RHEL7.  Below is output from RHEL7 KVM test virt:

[root@localhost ~]# lvs | grep testvg | wc -l
435
[root@localhost ~]# dmsetup ls | grep testvg | wc -l
435
[root@localhost ~]# iostat | grep dm- | wc -l
438
[root@localhost ~]# iostat -N | grep testvg | wc -l
435

Comment 2 Martin Poole 2016-12-20 15:56:03 UTC
Created attachment 1233922 [details]
Patch to lookup major/minor numbers correctly

Patch for bug.

Problem is caused by old SYSV assumption about major/minor mapping in st_rdev.

Patch converts manual decoding to system provided decode (as per upstream).

Comment 3 Michal Sekletar 2016-12-21 09:49:55 UTC
We need to backport following upstream commit,

https://github.com/sysstat/sysstat/commit/497fc3519799aa8813f184c4e3c3ec271e981574

Seems to be the same fix Martin came up with.

I think it is too late to get this into RHEL-6.9 (however I will talk to QE about this), proposing for RHEL-6.10 for now.