Bug 224078 - lvm(8) can leave a truncated /etc/lvm/.cache file
Summary: lvm(8) can leave a truncated /etc/lvm/.cache file
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2   
(Show other bugs)
Version: 4.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Alasdair Kergon
QA Contact: Corey Marthaler
URL:
Whiteboard:
Keywords:
: 224079 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-01-23 22:53 UTC by Kurtis D. Rader
Modified: 2007-11-17 01:14 UTC (History)
6 users (show)

Fixed In Version: RHBA-2007-0287
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-08 00:15:42 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0287 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2007-04-28 19:01:34 UTC

Description Kurtis D. Rader 2007-01-23 22:53:08 UTC
The lvm(8) family of commands can leave a truncated /etc/lvm/.cache file if the 
root filesystem becomes full while the file is being written. If the system is 
rebooted at that point it will fail to boot because the subsequent vgscan(8) 
will croak when it attempts to parse the incomplete cache file.

The problem is that the persistent_filter_dump() function does not check the 
return value of any of the writes or fclose(). In fact, simply checking the 
return value of the fclose() and not renaming the temporary file if the close 
fails should be sufficient. This obviously assumes persistent_filter_dump() has 
already been augmented to write to a temporary file and call rename() before 
returning (a change that has already been submitted).

Comment 2 Dave Wysochanski 2007-01-24 01:20:06 UTC
*** Bug 224079 has been marked as a duplicate of this bug. ***

Comment 4 Alasdair Kergon 2007-01-26 18:17:54 UTC
fclose() check included in lvm2-2.02.20-1.el4

No fwrite() checks yet.

Comment 7 Red Hat Bugzilla 2007-05-08 00:15:42 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0287.html


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