Bug 221613
Summary: | restoring failed mirrors appears to be broken | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Corey Marthaler <cmarthal> |
Component: | lvm2 | Assignee: | Jonathan Earl Brassow <jbrassow> |
Status: | CLOSED WORKSFORME | QA Contact: | Corey Marthaler <cmarthal> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 4.4 | CC: | agk, dwysocha, jbrassow, mbroz, prockai, rkenna, slevine |
Target Milestone: | --- | Keywords: | Documentation |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2007-12-20 17:18:57 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
2007-01-05 17:08:30 UTC
This turns out to be a documentation issue, in that there is a way to make this work, but I just wasn't sure how. Here is what needs to happen inorder to restore the mirror... When the failed disk comes back (or in this case is powered back up) and lvm notices it, it complains of an inconsisant vg, that is because that disk was appart of the old vg and knew that it had more devices in it earlier, where as those other devices currently in the vg are fine because they has basically written that failed device off. So now what needs to happen is for the failed device to be treated as a "new" device and recreated as a new pv, and then extended to the consistent vg, and then the mirror can be up converted. [root@link-08 ~]# pvcreate /dev/sda1 Warning: Volume group vg is not consistent Physical volume "/dev/sda1" successfully created [root@link-08 ~]# pvcreate /dev/sda2 Couldn't find device with uuid 'TGIIFC-15fe-vyMd-0mIN-Dmi4-iDD7-IPda53'. Couldn't find all physical volumes for volume group vg. Couldn't find device with uuid 'TGIIFC-15fe-vyMd-0mIN-Dmi4-iDD7-IPda53'. Couldn't find all physical volumes for volume group vg. Warning: Volume group vg is not consistent Physical volume "/dev/sda2" successfully created [root@link-08 ~]# vgextend vg /dev/sda1 Volume group "vg" successfully extended [root@link-08 ~]# vgextend vg /dev/sda2 Volume group "vg" successfully extended [root@link-08 ~]# pvscan PV /dev/sdb1 VG vg lvm2 [135.66 GB / 130.66 GB free] PV /dev/sdc1 VG vg lvm2 [135.66 GB / 135.66 GB free] PV /dev/sdd1 VG vg lvm2 [135.66 GB / 135.66 GB free] PV /dev/sde1 VG vg lvm2 [135.66 GB / 135.66 GB free] PV /dev/sdf1 VG vg lvm2 [135.66 GB / 135.66 GB free] PV /dev/sdg1 VG vg lvm2 [135.66 GB / 135.66 GB free] PV /dev/sdh1 VG vg lvm2 [135.66 GB / 135.65 GB free] PV /dev/sda1 VG vg lvm2 [603.93 GB / 603.93 GB free] PV /dev/sda2 VG vg lvm2 [603.93 GB / 603.93 GB free] Total: 9 [2.11 TB] / in use: 9 [2.11 TB] / in no VG: 0 [0 ] [root@link-08 ~]# lvconvert -m 1 /dev/vg/mirror Logical volume mirror converted. [root@link-08 ~]# lvs -a -o +devices LV VG Attr LSize Origin Snap% Move Log Copy% Devices mirror vg mwi-a- 5.00G mirror_mlog 100.00 mirror_mimage_0(0),mirror_mimage_1(0) [mirror_mimage_0] vg iwi-ao 5.00G /dev/sdb1(0) [mirror_mimage_1] vg iwi-ao 5.00G /dev/sda1(0) [mirror_mlog] vg lwi-ao 4.00M /dev/sdh1(0) As well as documenting this, for a future release let's try to handle this better - there are definitely things we could do in the logic - but we've got plenty of higher priority matters to deal with first. Patch added upstream for 2.02.22 which spots when a PV that had disappeared and been removed from the VG (with vgreduce --removemissing) reappears and wipes the VG metadata on it so it no longer thinks it is part of the VG. Adding 'cc ecs-dev-list for tracking # killed sdb - the secondary leg # I did the following commands after the down convert [root@neo-04 ~]# lvs LV VG Attr LSize Origin Snap% Move Log Copy% LogVol00 VolGroup00 -wi-ao 36.62G LogVol01 VolGroup00 -wi-ao 512.00M lv vg -wi-a- 500.00M [root@neo-04 ~]# ./on.sh sdb Turning on sdb [root@neo-04 ~]# lvs LV VG Attr LSize Origin Snap% Move Log Copy% LogVol00 VolGroup00 -wi-ao 36.62G LogVol01 VolGroup00 -wi-ao 512.00M lv vg -wi-a- 500.00M [root@neo-04 ~]# pvs PV VG Fmt Attr PSize PFree /dev/hda2 VolGroup00 lvm2 a- 37.16G 32.00M /dev/sda vg lvm2 a- 17.15G 16.66G /dev/sdc vg lvm2 a- 17.15G 17.15G /dev/sdd vg lvm2 a- 17.15G 17.15G /dev/sde vg lvm2 a- 17.15G 17.15G We good now? Removing automation notification Closing this bug... |