Bug 1248030
Summary: | bad .cache file prevents RHEV host from functioning after reboot | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Jaroslav Reznik <jreznik> |
Component: | lvm2 | Assignee: | LVM and device-mapper development team <lvm-team> |
lvm2 sub component: | Other (RHEL6) | QA Contact: | cluster-qe <cluster-qe> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | high | ||
Priority: | high | CC: | agk, heinzm, jbrassow, jherrman, mjuricek, msnitzer, mwest, prajnoha, prockai, tlavigne, zkabelac |
Version: | 6.6 | Keywords: | ZStream |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
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.
|
Story Points: | --- |
Clone Of: | 1240507 | Environment: | |
Last Closed: | 2015-08-24 07:49:55 UTC | Type: | --- |
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: | 1240507 | ||
Bug Blocks: |
Description
Jaroslav Reznik
2015-07-29 13:14:41 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! 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 |