Bug 247448 - LVM2 allows final MDA to be removed from a VG
Summary: LVM2 allows final MDA to be removed from a VG
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2   
(Show other bugs)
Version: 4.5
Hardware: All
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Bryn M. Reeves
QA Contact: Corey Marthaler
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 461306
TreeView+ depends on / blocked
 
Reported: 2007-07-09 11:21 UTC by Bryn M. Reeves
Modified: 2018-10-19 22:18 UTC (History)
8 users (show)

Fixed In Version: RHBA-2008-0776
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-07-24 20:07:19 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)
rfc patch adding checking for final MDA removal (2.53 KB, patch)
2007-07-09 12:48 UTC, Bryn M. Reeves
no flags Details | Diff
create format instance for orphan volume groups (4.24 KB, patch)
2008-03-20 22:33 UTC, Bryn M. Reeves
no flags Details | Diff
Make vgreduce use vg_split_mdas (1.42 KB, patch)
2008-03-20 22:34 UTC, Bryn M. Reeves
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0776 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2008-07-23 17:19:45 UTC

Description Bryn M. Reeves 2007-07-09 11:21:26 UTC
Description of problem:
LVM2 permits PVs to be created with 0 or more metadata areas. Creating volume
groups with less MDAs than PVs improves tool performance for VGs with large
numbers of PVs.

Currently the tools permit the last MDA to be removed from a VG with no warning,
causing the VG to suddenly "disappear". 

Version-Release number of selected component (if applicable):
lvm2-2.02.21-5.el4, lvm2-2.02.24-1.fc7, lvm2 CVS 20070707.

How reproducible:
100%

Steps to Reproduce:
1. Create a volume group with #MDAS < #PVs:
pvcreate --metadatacopies=1 /dev/loop0
pvcreate --metadatacopies=0 /dev/loop1
vgcreate t0 /dev/loop0 /dev/loop1

2. Attempt to remove the PV that contains the MDA
vgreduce t0 /dev/loop0
 
Actual results:
# vgreduce t0 /dev/loop0
  Removed "/dev/loop0" from volume group "t0"
# vgs
  No volume groups found



Expected results:
# vgreduce t0 /dev/loop0
  Can't remove final metadata area on physical volume "/dev/loop0" from volume
group "t0"


Additional info:

Comment 1 Bryn M. Reeves 2007-07-09 12:48:15 UTC
Created attachment 158763 [details]
rfc patch adding checking for final MDA removal

Comment 2 Bryn M. Reeves 2007-11-05 10:45:22 UTC
Now the is_orphan_vg() patches are upstream this should be addressed by the
per-format type orphan support & using vg_split_mdas() to enforce the MDA checking.



Comment 3 Bryn M. Reeves 2008-03-20 22:33:44 UTC
Created attachment 298754 [details]
create format instance for orphan volume groups

Make _vg_read_orphans create a format instance when reading orphan VGs.

Comment 4 Bryn M. Reeves 2008-03-20 22:34:43 UTC
Created attachment 298755 [details]
Make vgreduce use vg_split_mdas

Make vgreduce use vg_split_mdas so we don't leave a VG with no MDAs at all.

Comment 9 RHEL Product and Program Management 2008-04-02 12:38:44 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 16 Corey Marthaler 2008-06-27 21:19:37 UTC
Fix verified in lvm2-2.02.37-3.el4.

Comment 18 errata-xmlrpc 2008-07-24 20:07:19 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 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-2008-0776.html


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