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 1248030 - bad .cache file prevents RHEV host from functioning after reboot
Summary: bad .cache file prevents RHEV host from functioning after reboot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.6
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 1240507
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-29 13:14 UTC by Jaroslav Reznik
Modified: 2019-08-15 05:00 UTC (History)
11 users (show)

Fixed In Version: lvm2-2.02.111-2.el6_6.5
Doc Type: Bug Fix
Doc Text:
Prior to this update, using the lvm utility when the persistent cache file was outdated caused devices that were stored in the persistent cache to unintentionally bypass logical volume manager (LVM) filters set in the LVM configuration. As a consequence, Red Hat Enterprise Virtualization hosts in some cases failed to start with an outdated cache file. This update fixes LVM's internal cache handling so that the filters are applied properly, and the described problem no longer occurs.
Clone Of: 1240507
Environment:
Last Closed: 2015-08-24 07:49:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1655 0 normal SHIPPED_LIVE lvm2 bug fix update 2015-09-11 17:01:45 UTC

Description Jaroslav Reznik 2015-07-29 13:14:41 UTC
This bug has been copied from bug #1240507 and has been proposed
to be backported to 6.6 z-stream (EUS).

Comment 4 Peter Rajnoha 2015-07-30 11:04:33 UTC
I'm attaching complete reproducer here because it's very important to test this properly and avoid confusion by touching .cache file and hence changing timestamps (because timestamp comparison for lvm.conf file and .cache file matters a lot here for rescans and we could test completely different thing then!).

(remove existing .cache file to start with clean state)
# rm -f /etc/lvm/cache/.cache

(make sure filter is not set)
# lvm dumpconfig devices/filter
  Configuration node devices/filter not found

(create a PV on base device)
# pvcreate /dev/sda
  Physical volume "/dev/sda" successfully created

(get the PV UUID of just created PV)
# pvs -o name,uuid /dev/sda
  PV         PV UUID                               
  /dev/sda   T55Rb7-CWWS-7tSM-Wnq8-UZQs-4IPe-YMKbhO

# ...edit devices/filter setting in /etc/lvm/lvm.conf to reject all devices...

(make sure filter is set to reject all devices)
# lvm dumpconfig devices/filter
filter="r|.*|"

(get size of the base device...)
# blockdev --getsize /dev/sda
262144

(...and use the size to create dm mapping over the whole device - this simulates mpath for example)
# dmsetup create test --table "0 262144 linear /dev/sda 0"

(get the dm-X block device name for the mapping)
# dmsetup info -c -o name,blkdevname test
Name             BlkDevName      
test             dm-2 

(check the lvm-pv-uuid-* symlink points to the dm device we just created)
# ls -l /dev/disk/by-id/lvm-pv-uuid-T55Rb7-CWWS-7tSM-Wnq8-UZQs-4IPe-YMKbhO 
lrwxrwxrwx. 1 root root 10 Jul 30 12:49 /dev/disk/by-id/lvm-pv-uuid-T55Rb7-CWWS-7tSM-Wnq8-UZQs-4IPe-YMKbhO -> ../../dm-2

(call pvs to scan the state as it is now - that is with the dm mapping over the base device)
# pvs

(now remove the mapping)
# dmsetup remove test                        

(check the lvm-pv-uuid-* symlinks now points to the base device)
# ls -l /dev/disk/by-id/lvm-pv-uuid-T55Rb7-CWWS-7tSM-Wnq8-UZQs-4IPe-YMKbhO 
lrwxrwxrwx. 1 root root 9 Jul 30 12:50 /dev/disk/by-id/lvm-pv-uuid-T55Rb7-CWWS-7tSM-Wnq8-UZQs-4IPe-YMKbhO -> ../../sda

(call pvs now - recall that we have filter set to "reject all" and despite that pvs incorrectly displays the base device because it's confused by the outdated persistent cache - the .cache file and the bug we had in the cache handling code)
# pvs                   
  PV         VG   Fmt  Attr PSize   PFree  
  /dev/sda        lvm2 ---  128.00m 128.00m


When all works correctly with the fixed version, the last command shouldn't display anything as we reject all devices with the filter!

Comment 7 errata-xmlrpc 2015-08-24 07:49:55 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://rhn.redhat.com/errata/RHBA-2015-1655.html


Note You need to log in before you can comment on or make changes to this bug.