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 1722860

Summary: After a pvmove the readahead value of lvm is going to be 0
Product: Red Hat Enterprise Linux 7 Reporter: Shivam Gupta <shivgupt>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: Other QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: urgent    
Priority: medium CC: agk, andrew.vanslageren, cmarthal, heinzm, jbrassow, jpittman, loberman, mcsontos, msnitzer, nkshirsa, prajnoha, rbednar, rhandlin, rmadhuso, zkabelac
Version: 7.6   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.186-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-31 20:04:51 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:

Description Shivam Gupta 2019-06-21 14:05:45 UTC
Description of problem:
After a pvmove the readahead value of lvm is going to be 0

Version-Release number of selected component (if applicable):
Rhel 7.X all

How reproducible:

Doing a pvmove will reproduce the issue.

Steps to Reproduce:

1> Disable tuned

[root@localhost ~]# systemctl status tuned
● tuned.service - Dynamic System Tuning Daemon
   Loaded: loaded (/usr/lib/systemd/system/tuned.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:tuned(8)
           man:tuned.conf(5)
           man:tuned-adm(8)

2> Check the current setting of LV.

[root@localhost ~]# lvs -o +devices testvg
  LV   VG     Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices     
  lv1  testvg -wi-a----- 1020.00m                                                     /dev/sda1(0)

[root@localhost ~]# dmsetup info -C | grep testvg
testvg-lv1       253   0 L--w    0    1      0 LVM-PnvXfWMsSNlCuBBaPjAMrZj0kDozXiGQ6pzs2hetmQegGWlhrtUvOywDlg9oFCX5

[root@localhost ~]# cat /sys/block/dm-0/queue/read_ahead_kb 
128

3> Do a pvmove:

[root@localhost ~]# pvmove /dev/sda1 /dev/sda2
  /dev/sda1: Moved: 0.39%
  /dev/sda1: Moved: 100.00%

4> Check the read_ahead_kb value

[root@localhost ~]# cat /sys/block/dm-0/queue/read_ahead_kb 
0

A workaround for this case is vgchange --refresh.

Actual results:
The read_ahead_kb value is getting changed to 0.

Expected results:
It should not change the read_ahead_kb value to 0.

Additional info:

Comment 4 Jonathan Earl Brassow 2019-08-19 19:22:56 UTC
how much could this be affecting performance?  (see bug 1740648)  Are these two bugs related?

Comment 5 Zdenek Kabelac 2019-08-20 13:01:03 UTC
*** Bug 1740648 has been marked as a duplicate of this bug. ***

Comment 6 Zdenek Kabelac 2019-08-20 13:03:14 UTC
Correcting table reload with read ahead settings after pvmove has finished (in stable branch)

https://www.redhat.com/archives/lvm-devel/2019-August/msg00062.html


(Also adding missing synchronization point)

https://www.redhat.com/archives/lvm-devel/2019-August/msg00063.html


Same patches want for upstream lvm2.

Comment 12 Zdenek Kabelac 2019-10-11 09:42:48 UTC
I assume LV also checkes 'default' RA set by kernel during creation - and never sets a smaller value that the one set automatically by kernel.

So in this case I assume any LV created on /dev/sdb will use 128KiB RA  (256 sectors).

For testing I'd probably suggest to experiment with higher values - whether those are still preserved.

Comment 17 errata-xmlrpc 2020-03-31 20:04:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1129