Description of problem: Test output: --------------------------------------------- base legs 3; convert to 1 legs; active 0; sync=0; log=core; pvs=sufficient --------------------------------------------- creating a base mirror on grant-02 deactivating base volume before convert on grant-01 Converting from 3 leg(s) to 1 leg(s) on grant-02 lvconvert --mirrorlog core -m 1 centipede/centi_base /dev/sdc1 /dev/sdc3 Unable to determine mirror sync status of centipede/centi_base. Unable to remove primary mirror image while mirror is not in-sync Version-Release number of selected component (if applicable): 2.6.18-192.el5 lvm2-2.02.56-8.el5_5.3 BUILT: Wed Apr 28 03:08:59 CDT 2010 lvm2-cluster-2.02.56-7.el5_5.1 BUILT: Thu Apr 22 07:02:04 CDT 2010 device-mapper-1.02.39-1.el5_5.2 BUILT: Thu Apr 22 04:30:57 CDT 2010 cmirror-1.1.39-8.el5 BUILT: Wed Mar 3 09:31:58 CST 2010 kmod-cmirror-0.1.22-3.el5 BUILT: Tue Dec 22 13:39:47 CST 2009 How reproducible: Often
Attaching full -vvvv log... #format_text/archiver.c:127 Archiving volume group "centipede" metadata (seqno 134). #lvconvert.c:683 Setting logging type to core #metadata/mirror.c:533 Reducing mirror set from 4 to 2 image(s) and no log volume. #activate/activate.c:456 Getting device info for centipede-centi_base #ioctl/libdm-iface.c:1740 dm info LVM-nyIxipVlialS1ACBMc3hh7CjLNiaFtwIfGMOXriy0aQwURD6m5RYES3GpkfGQcgp NF [16384] #ioctl/libdm-iface.c:1740 dm info nyIxipVlialS1ACBMc3hh7CjLNiaFtwIfGMOXriy0aQwURD6m5RYES3GpkfGQcgp NF [16384] #ioctl/libdm-iface.c:1740 dm info centipede-centi_base NF [16384] #metadata/mirror.c:478 Unable to determine mirror sync status of centipede/centi_base. #metadata/mirror.c:557 Unable to remove primary mirror image while mirror is not in-sync #metadata/mirror.c:558 <backtrace> #metadata/mirror.c:726 <backtrace> #lvconvert.c:732 <backtrace> #lvconvert.c:1022 <backtrace> #locking/cluster_locking.c:466 Locking VG V_centipede UN (VG) (0x6
Created attachment 413564 [details] lvconvert -vvvv --mirrorlog core -m 1 centipede/centi_base /dev/sdc1 /dev/sdc3 > /tmp/lvconvert 2>&1
No dm stuff shows up before or after the failure due to it being inactive: Converting from 3 leg(s) to 0 leg(s) on grant-02 info: Name Maj Min Stat Open Targ Event UUID VolGroup00-LogVol01 253 1 L--w 1 1 0 LVM-RDJ1P8ieOwNeioALQCGSomXR23jOJrs4qApUeTmnKm99geaXhXNadZzcaEpTNHfp VolGroup00-LogVol00 253 0 L--w 1 1 0 LVM-RDJ1P8ieOwNeioALQCGSomXR23jOJrs4eKKvOyJhYxYQVza81JizSt4XjAl1e6bT table: VolGroup00-LogVol01: 0 20578304 linear 8:2 135397760 VolGroup00-LogVol00: 0 135397376 linear 8:2 384 status: VolGroup00-LogVol01: 0 20578304 linear VolGroup00-LogVol00: 0 135397376 linear lvconvert --mirrorlog core -m 0 centipede/centi_base /dev/sdc3 /dev/sdc2 /dev/sdc1 Unable to determine mirror sync status of centipede/centi_base. Unable to remove primary mirror image while mirror is not in-sync couldn't convert on grant-02 info: Name Maj Min Stat Open Targ Event UUID VolGroup00-LogVol01 253 1 L--w 1 1 0 LVM-RDJ1P8ieOwNeioALQCGSomXR23jOJrs4qApUeTmnKm99geaXhXNadZzcaEpTNHfp VolGroup00-LogVol00 253 0 L--w 1 1 0 LVM-RDJ1P8ieOwNeioALQCGSomXR23jOJrs4eKKvOyJhYxYQVza81JizSt4XjAl1e6bT table: VolGroup00-LogVol01: 0 20578304 linear 8:2 135397760 VolGroup00-LogVol00: 0 135397376 linear 8:2 384 status: VolGroup00-LogVol01: 0 20578304 linear VolGroup00-LogVol00: 0 135397376 linear
It appears that this bug only occurs when down converting, and when specifying the pvs in the mirror to remove. Fails: Converting from 3 leg(s) to 1 leg(s) on grant-02 lvconvert --mirrorlog core -m 1 centipede/centi_base /dev/sdc1 /dev/sdc3 Passes: Converting from 3 leg(s) to 1 leg(s) on grant-02 lvconvert --mirrorlog core -m 1 centipede/centi_base I'll need further testing to verify if this is always true however.
Further testing passed when not specifying the pvs to remove when down converting.
Like 596537... The primary device of an LVM mirror cannot be removed unless the mirror is in-sync. This is because the validity of the remaining devices is unknown in this case. When an LVM mirror is inactive, its sync state cannot be determined. Thus, the primary image of an LVM mirror cannot be removed while the mirror is inactive. Closing NOTABUG... However, if you think it would improve things to have a prompt to query the user if they are sure they want the primary removed in this case, then I would be willing to do something like that. Simply reopen in that case.