Bug 598886
Summary: | LVM2: lvchange --refresh returns without error when pvs are missing | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Ofer Schreiber <oschreib> |
Component: | lvm2 | Assignee: | Milan Broz <mbroz> |
Status: | CLOSED ERRATA | QA Contact: | Corey Marthaler <cmarthal> |
Severity: | urgent | Docs Contact: | |
Priority: | urgent | ||
Version: | 5.5 | CC: | abaron, agk, bazulay, cpelland, dwysocha, heinzm, iheim, jbrassow, joe.thornber, jturner, mbroz, prockai, pvrabec |
Target Milestone: | rc | Keywords: | ZStream |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | lvm2-2.02.56-12.el5 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-01-13 22:41:50 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: | |||
Bug Depends On: | |||
Bug Blocks: | 601078 |
Description
Ofer Schreiber
2010-06-02 09:45:09 UTC
Please can we have full debug log from the lvchange --refrech command? (add -vvvv) Fixed upstream, for refreshing partial LVs it requires -P switch, otherwise it fails woth non-zero return code. Fixed in lvm2-2.02.56-12.el5. Is this all we need to verify, that the cmd returns non zero without the --partial and zero with the --partial? [root@taft-01 tmp]# pvscan Couldn't find device with uuid mtlSmT-JNPp-2ro8-xEb2-XDDe-Vz3I-mdyJ76. PV /dev/sdb1 VG VG lvm2 [135.66 GiB / 135.57 GiB free] PV unknown device VG VG lvm2 [135.66 GiB / 135.57 GiB free] PV /dev/sdd1 VG VG lvm2 [135.66 GiB / 135.66 GiB free] PV /dev/sde1 lvm2 [135.67 GiB] PV /dev/sdf1 lvm2 [135.67 GiB] PV /dev/sdg1 lvm2 [135.67 GiB] PV /dev/sdh1 lvm2 [135.67 GiB] Total: 8 [1017.40 GiB] / in use: 4 [474.74 GiB] / in no VG: 4 [542.66 GiB] [root@taft-01 tmp]# lvs -a -o +devices Couldn't find device with uuid mtlSmT-JNPp-2ro8-xEb2-XDDe-Vz3I-mdyJ76. LV VG Attr LSize Move Log Copy% Convert Devices mirror VG mwi-a- 100.00m mirror_mlog 100.00 mirror_mimage_0(0),mirror_mimage_1(0) [mirror_mimage_0] VG iwi-ao 100.00m /dev/sdb1(0) [mirror_mimage_1] VG iwi-ao 100.00m unknown device(0) [mirror_mlog] VG lwi-ao 4.00m /dev/sdd1(0) [root@taft-01 tmp]# lvchange --refresh VG/mirror Couldn't find device with uuid mtlSmT-JNPp-2ro8-xEb2-XDDe-Vz3I-mdyJ76. Refusing refresh of partial LV mirror. Use --partial to override. [root@taft-01 tmp]# echo $? 5 [root@taft-01 tmp]# lvchange --refresh --partial VG/mirror Partial mode. Incomplete volume groups will be activated read-only. Couldn't find device with uuid mtlSmT-JNPp-2ro8-xEb2-XDDe-Vz3I-mdyJ76. [root@taft-01 tmp]# echo $? 0 With --partial it should really remap part of that LV to error target (or to missing filer specified in lvm.conf). This must not happen without --partial specified (see dmsetup table after the command is run). Milan, in response to comment #9, you say the error target shouldn't exist w/o the --partial specified? but it does show up after running w/o --partial. Can you check the following output and verify if that's expected. [root@grant-01 tmp]# lvs -a -o +devices LV VG Attr LSize Log Copy% Devices mirror grant mwi-a- 500.00M mirror_mlog 100.00 mirror_mimage_0(0),mirror_mimage_1(0) [mirror_mimage_0] grant iwi-ao 500.00M /dev/sdb1(0) [mirror_mimage_1] grant iwi-ao 500.00M /dev/sdb2(0) [mirror_mlog] grant lwi-ao 4.00M /dev/sdc2(0) [root@grant-01 tmp]# echo offline > /sys/block/sdc/device/state [root@grant-01 tmp]# pvscan /dev/sdc2: read failed after 0 of 1024 at 58514538496: Input/output error /dev/sdc2: read failed after 0 of 1024 at 58514632704: Input/output error /dev/sdc2: read failed after 0 of 1024 at 0: Input/output error /dev/sdc2: read failed after 0 of 1024 at 4096: Input/output error /dev/sdc2: read failed after 0 of 2048 at 0: Input/output error Couldn't find device with uuid ZTAokb-74em-zwuH-dmfv-N2g7-QBma-JwQTbd. Couldn't find device with uuid aG8agq-id0n-nwB8-WT3f-pkm6-HVMN-i3Wlcj. PV /dev/sdb1 VG grant lvm2 [40.87 GB / 40.38 GB free] PV /dev/sdb2 VG grant lvm2 [40.87 GB / 40.38 GB free] PV unknown device VG grant lvm2 [54.49 GB / 54.49 GB free] PV unknown device VG grant lvm2 [54.49 GB / 54.49 GB free] [root@grant-01 tmp]# lvs -a -o +devices /dev/sdc2: read failed after 0 of 2048 at 0: Input/output error /dev/sdc2: read failed after 0 of 1024 at 58514538496: Input/output error /dev/sdc2: read failed after 0 of 1024 at 58514632704: Input/output error /dev/sdc2: read failed after 0 of 1024 at 0: Input/output error /dev/sdc2: read failed after 0 of 1024 at 4096: Input/output error Couldn't find device with uuid ZTAokb-74em-zwuH-dmfv-N2g7-QBma-JwQTbd. Couldn't find device with uuid aG8agq-id0n-nwB8-WT3f-pkm6-HVMN-i3Wlcj. LV VG Attr LSize Log Copy% Devices mirror grant mwi-a- 500.00M mirror_mlog 100.00 mirror_mimage_0(0),mirror_mimage_1(0) [mirror_mimage_0] grant iwi-ao 500.00M /dev/sdb1(0) [mirror_mimage_1] grant iwi-ao 500.00M /dev/sdb2(0) [mirror_mlog] grant lwi-ao 4.00M unknown device(0) [root@grant-01 tmp]# lvchange --refresh grant/mirror /dev/sdc2: read failed after 0 of 2048 at 0: Input/output error /dev/sdc2: read failed after 0 of 1024 at 58514538496: Input/output error /dev/sdc2: read failed after 0 of 1024 at 58514632704: Input/output error /dev/sdc2: read failed after 0 of 1024 at 0: Input/output error /dev/sdc2: read failed after 0 of 1024 at 4096: Input/output error Couldn't find device with uuid ZTAokb-74em-zwuH-dmfv-N2g7-QBma-JwQTbd. Couldn't find device with uuid aG8agq-id0n-nwB8-WT3f-pkm6-HVMN-i3Wlcj. Refusing refresh of partial LV mirror. Use --partial to override. [root@grant-01 tmp]# echo $? 5 [root@grant-01 tmp]# dmsetup table grant-mirror: 0 1024000 mirror disk 3 253:2 1024 block_on_error 2 253:3 0 253:4 0 grant-mirror_mlog: 0 8192 linear 8:34 384 grant-mirror_mimage_1: 0 1024000 linear 8:18 384 grant-mirror_mimage_0: 0 1024000 linear 8:17 384 [root@grant-01 tmp]# lvchange --refresh --partial grant/mirror Partial mode. Incomplete logical volumes will be processed. /dev/sdc2: read failed after 0 of 2048 at 0: Input/output error /dev/sdc2: read failed after 0 of 1024 at 58514538496: Input/output error /dev/sdc2: read failed after 0 of 1024 at 58514632704: Input/output error /dev/sdc2: read failed after 0 of 1024 at 0: Input/output error /dev/sdc2: read failed after 0 of 1024 at 4096: Input/output error Couldn't find device with uuid ZTAokb-74em-zwuH-dmfv-N2g7-QBma-JwQTbd. Couldn't find device with uuid aG8agq-id0n-nwB8-WT3f-pkm6-HVMN-i3Wlcj. [root@grant-01 tmp]# echo $? 0 [root@grant-01 tmp]# dmsetup table grant-mirror: 0 1024000 mirror core 2 1024 block_on_error 2 253:3 0 253:4 0 grant-mirror_mimage_1: 0 1024000 linear 8:18 384 grant-mirror_mimage_0: 0 1024000 linear 8:17 384 Yes, comment #11 seems to me to be correct: - device with mirror log failed -> mirror LV is not in partial state -> lvchange --refresh is NOOP without -P flag, command returns error code - with -P, the missing parts of LV are replaced with error taget, here it is mirror log, so code switch to core log instead (replacing log device with error target is nonsense) -> comand returns 0 (In reply to comment #12) > - mirror LV _IS_ in partial state ... Marking verified with the latest rpms. 2.6.18-227.el5 lvm2-2.02.74-1.el5 BUILT: Fri Oct 15 10:26:21 CDT 2010 lvm2-cluster-2.02.74-2.el5 BUILT: Fri Oct 29 07:48:11 CDT 2010 device-mapper-1.02.55-1.el5 BUILT: Fri Oct 15 06:15:55 CDT 2010 cmirror-1.1.39-10.el5 BUILT: Wed Sep 8 16:32:05 CDT 2010 kmod-cmirror-0.1.22-3.el5 BUILT: Tue Dec 22 13:39:47 CST 2009 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-2011-0052.html |