Bug 908097
Summary: | Cannot vgimport repair exported broken LVM mirror | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Dave Sullivan <dsulliva> | |
Component: | lvm2 | Assignee: | Jonathan Earl Brassow <jbrassow> | |
Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 5.8 | CC: | agk, cmarthal, cww, dwysocha, heinzm, jbrassow, msnitzer, nperic, prajnoha, prockai, slevine, thornber, zkabelac | |
Target Milestone: | rc | Keywords: | Patch | |
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | lvm2-2.02.88-11.el5 | Doc Type: | Bug Fix | |
Doc Text: |
Previously, if a device had failed after a vgexport was issued, it would be impossible to import the volume group. Additionally, a failure to import also meant it was impossible to repair the volume group.
It is now possible to use the '--force' option with vgimport to import volume groups even if there are devices missing.
|
Story Points: | --- | |
Clone Of: | ||||
: | 908381 (view as bug list) | Environment: | ||
Last Closed: | 2013-10-01 00:27:52 UTC | Type: | Bug | |
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: | ||||
Bug Blocks: | 836232, 908381, 928849 |
Description
Dave Sullivan
2013-02-05 21:28:18 UTC
This bug is the same as bug 913644. It was fixed with the following upstream commit: https://bugzilla.redhat.com/show_bug.cgi?id=913644#c2 commit 3ab46449f4dbcc45fe878149838a8439f5ac8b34 Author: Jonathan Brassow <jbrassow> Date: Wed Feb 20 16:28:26 2013 -0600 vgimport: Allow '--force' to import VGs with missing PVs. When there are missing PVs in a volume group, most operations that alter the LVM metadata are disallowed. It turns out that 'vgimport' is one of those disallowed operations. This is bad because it creates a circular dependency. 'vgimport' will complain that the VG is inconsistent and that 'vgreduce --removemissing' must be run. However, 'vgreduce' cannot be run because it has not been imported. Therefore, 'vgimport' must be one of the operations allowed to change the metadata when PVs are missing. The '--force' option is the way to make 'vgimport' happen in spite of the missing PVs. Verified that import can succeeed with suppliting --force with lvm2-2.02.88-11.el5 (04:59:32) [root@r5-node02:~]$ vgimport trashed Couldn't find device with uuid 6QXgTN-nbEw-kTvO-2IR7-s0tS-RwlG-GvGV9f. Cannot change VG trashed while PVs are missing. Consider vgreduce --removemissing. (04:59:42) [root@r5-node02:~]$ vgimport trashed --force '--force' supplied. Volume groups with missing PVs will be imported. Couldn't find device with uuid 6QXgTN-nbEw-kTvO-2IR7-s0tS-RwlG-GvGV9f. Volume group "trashed" successfully imported (04:59:55) [root@r5-node02:~]$ vgs Couldn't find device with uuid 6QXgTN-nbEw-kTvO-2IR7-s0tS-RwlG-GvGV9f. VG #PV #LV #SN Attr VSize VFree VolGroup00 1 2 0 wz--n- 8.88G 0 test 7 1 0 wz--n- 69.97G 69.48G trashed 2 1 0 wz-pn- 1.95G 988.00M Marking verified with lvm2-2.02.88-11.el5 (08:12:18) [root@r5-node02:~]$ losetup -d /dev/loop1 (08:12:39) [root@r5-node02:~]$ vgs Couldn't find device with uuid oEuL7I-FJfA-kg0P-gbRm-VOUq-FAyE-Mc17Kn. VG #PV #LV #SN Attr VSize VFree VolGroup00 1 2 0 wz--n- 8.88G 0 test 4 3 0 wz--n- 39.98G 39.39G trashme 2 1 0 wzxpn- 1.95G 988.00M (08:12:43) [root@r5-node02:~]$ vgimport trashme Couldn't find device with uuid oEuL7I-FJfA-kg0P-gbRm-VOUq-FAyE-Mc17Kn. Cannot change VG trashme while PVs are missing. Consider vgreduce --removemissing. (08:12:53) [root@r5-node02:~]$ vgimport trashme --force '--force' supplied. Volume groups with missing PVs will be imported. Couldn't find device with uuid oEuL7I-FJfA-kg0P-gbRm-VOUq-FAyE-Mc17Kn. Volume group "trashme" successfully imported (08:12:56) [root@r5-node02:~]$ vgs Couldn't find device with uuid oEuL7I-FJfA-kg0P-gbRm-VOUq-FAyE-Mc17Kn. VG #PV #LV #SN Attr VSize VFree VolGroup00 1 2 0 wz--n- 8.88G 0 test 4 3 0 wz--n- 39.98G 39.39G trashme 2 1 0 wz-pn- 1.95G 988.00M 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. http://rhn.redhat.com/errata/RHBA-2013-1352.html |