Description of problem: This once again ties into bz 170705 (lvm volume ownership). If you have a clustered lv and you wish to place that clustered lv in the local node domain (vgchange -an) then either clvmd/lvm needs to enforce that the user deactivates the volume before hand, or (and I would argue that this is the better solution) it needs to deactivate the volume on all nodes except for the node which the change to local domain cmd was executed. This is especially true with cmirrors, as you'll run into problems if a deactivation isn't done. In the non mirror case, you end up with a local lvm volume that is still active on all nodes in the cluster, and that's a corruption issue waiting to happen. Version-Release number of selected component (if applicable): lvm2-cluster-2.02.27-2.el4 lvm2-2.02.27-2.el4 How reproducible: everytime
Another problem that will happen as a result of switching domains is that, when you switch to the local domain, and then deactivate by hand that volume on the other nodes, you will be unable to activate it in the single node domain. [root@link-08 tmp]# vgs VG #PV #LV #SN Attr VSize VFree VolGroup00 1 2 0 wz--n- 74.41G 96.00M corey 8 1 0 wz--n- 2.11T 2.11T [root@link-08 tmp]# lvs corey/lv LV VG Attr LSize Origin Snap% Move Log Copy% lv corey -wi--- 1.00G [root@link-08 tmp]# vgchange -ay corey 0 logical volume(s) in volume group "corey" now active Once you're in this situation, there's no way that I know of to get that volume activated unless you recreate it.
*** Bug 235123 has been marked as a duplicate of this bug. ***
Fixed in lvm2-2.02.42-8.el4.
Nothing in this bug has been fixed. Putting back into ASSIGNED. # Change from cluster to local [root@grant-01 ~]# vgs VG #PV #LV #SN Attr VSize VFree grant 6 1 0 wz--nc 238.39G 238.30G [root@grant-01 ~]# vgchange -cn grant Volume group "grant" successfully changed [root@grant-01 ~]# vgchange -an grant 0 logical volume(s) in volume group "grant" now active [root@grant-01 ~]# lvs -a -o +devices LV VG Attr LSize Origin Snap% Move Log Copy% Convert Devices lv grant -wi--- 100.00M /dev/sdc1(0) # Remains active on other nodes [root@grant-02 ~]# lvs -a -o +devices LV VG Attr LSize Origin Snap% Move Log Copy% Convert Devices lv grant -wi-a- 100.00M /dev/sdc1(0) # Deactivate by hand on other nodes [root@grant-02 ~]# vgchange -an grant 0 logical volume(s) in volume group "grant" now active # Still unable to Activate on original local node [root@grant-01 ~]# vgchange -ay grant 0 logical volume(s) in volume group "grant" now active
The lvm2 4.9 packages contain check that clustered flag cannot be switched for mirrors and snapshots if active but not for linear/striped and automatic deactivation is not implemented upstream. After the discussion with Corey we decided that it is better close this WONTFIX for RHEL4 and track problem for new releases (despite that part of problem is fixed in errata - fix is simply not complete yet.)