Bug 431760
Summary: | lvm delete message calulates the number of volumes incorrectly | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Corey Marthaler <cmarthal> |
Component: | lvm2 | Assignee: | Peter Rajnoha <prajnoha> |
Status: | CLOSED ERRATA | QA Contact: | Corey Marthaler <cmarthal> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 5.2 | CC: | agk, dwysocha, edamato, heinzm, jbrassow, mbroz, prockai |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-09-02 11:57:35 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: |
Description
Corey Marthaler
2008-02-06 20:01:35 UTC
Could probably fix this easily by adding a "count_visible_lv()" function which iterates over lvs and calls "lv_is_visible()". Should also examine the code for other instances of this incorrect LV counting. In case we have, for example, one snapshot volume in VG, lv_is_visible() will take into account all 3 LVs in this case and mark them as visible. I think that could confuse the user because only 2 LVs are visible actually (origin+snapshot). I would probably do this by checking the VISIBLE_LV flag directly and not calling lv_is_visible(). *** Bug 465168 has been marked as a duplicate of this bug. *** There are other places in code where similar inconsistency related to counting visible LVs (from user's perspective!) can be found, like in output of "vgdisplay -c" command. Snapshot volumes should be counted in statistics of open LVs within the output of "vgdisplay", "vgremove" should count snapshot volumes as well while displaying the message about the number of LVs beeing deleted. Renaming of hidden snapshot volumes should not be allowed for a user. All these cases are related to testing the visibility and counting of LVs from user's perpsective, so two new functions have been proposed - displayable_lvs_in_vg counting LVs in a given VG that are displayable to the user through outputs of commands and lv_is_displayable testing the actual visibility of an LV. These should be used instead of lv_is_visible function whenever a test for visibility and counting from user's perspective is needed (e.g. in listings and outputs of user commands). The fix has been uploaded to CVS. Fix in version lvm2-2.02.46-1.el5. Fix verified in lvm2-2.02.46-2.el5. 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 therefore 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-2009-1393.html |