Bug 734134 - FEAT: HA-LVM pvmove on mirrored LV
Summary: FEAT: HA-LVM pvmove on mirrored LV
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2
Version: 5.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jonathan Earl Brassow
QA Contact: Corey Marthaler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-29 14:19 UTC by Petter Hassberg
Modified: 2019-04-16 13:59 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-15 19:29:19 UTC


Attachments (Terms of Use)

Description Petter Hassberg 2011-08-29 14:19:40 UTC
Description of problem:

When using HA-LVM original method (no clvmd) and settings in /etc/cluster.conf specifies a LV and VG name (not only VG name) pvmove fails.

The tags prevent successful pvmoves because they do not  propagate to the necessary volumes when pvmove:ing, and so pvmove does not work.


 [root@localhost~]# pvmove -v /dev/sdc2 /dev/sdd2
 Finding volume group "vg_X"
 Archiving volume group "vg_X" metadata (seqno 105).
 Creating logical volume pvmove0
 Moving 9929 extents of logical volume vg_X/lv_Y
 Found volume group "vg_X"
 Updating volume group metadata
 Found volume group "vg_X"
 Suspending vg_X-lv_edi (252:7) with device flush
 Found volume group "vg_X"
 Not activating vg_X/pvmove0 due to config file settings



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create cluster
2.  Present three disks to cluster members (two to mirror, a third to pvmove to) 
3. Configure HA LVM (https://access.redhat.com/kb/docs/DOC-3068) using the original method ie no clvm by mirroring two of the disks and adding the resulting VG/LV in cluster conf.

2. try pvmove to move all data from one disk to third disk
  
Actual results:

 Not activating vg_X/pvmove0 due to config file settings

Expected results:

 Successful pvmove

Comment 1 Petter Hassberg 2011-08-29 14:21:03 UTC
Work around can be adding "vg_X/pvmove0" to the "volume_list" section in /etc/lvm/lvm.conf but then cluster will want to create a new initrd.

Comment 2 Corey Marthaler 2011-10-24 20:55:32 UTC
I ran into the source PV "contains locked, hidden or non-top level LVs only" message when attempting the pvmove on a HA lvm mirrored PV. I didn't see the "config file settings" issue.


<rm log_level="7">
         <failoverdomains>
                 <failoverdomain name="GRANT_domain" ordered="1" restricted="1">
                         <failoverdomainnode name="grant-01" priority="1"/>
                         <failoverdomainnode name="grant-02" priority="1"/>
                         <failoverdomainnode name="grant-03" priority="1"/>
                 </failoverdomain>
         </failoverdomains>
         <resources>
                 <lvm name="lvm" vg_name="GRANT"/>
                 <fs device="/dev/GRANT/ha1" force_fsck="0" force_unmount="1" fstype="xfs" mountpoint="/mnt/fs1" name="fs1" options="" self_fence="0"/>
                 <fs device="/dev/GRANT/ha2" force_fsck="0" force_unmount="1" fstype="xfs" mountpoint="/mnt/fs2" name="fs2" options="" self_fence="0"/>
         </resources>
         <service autostart="1" domain="GRANT_domain" name="halvm" recovery="relocate">
                 <lvm ref="lvm"/>
                 <fs ref="fs1"/>
                 <fs ref="fs2"/>
         </service>
</rm>


[root@grant-01 ~]# clustat
Cluster Status for GRANT @ Mon Oct 24 15:47:00 2011
Member Status: Quorate

 Member Name           ID   Status
 ------ ----           ---- ------
 grant-01                 1 Online, Local, rgmanager
 grant-02                 2 Online, rgmanager
 grant-03                 3 Online, rgmanager

 Service Name          Owner (Last)        State         
 ------- ----          ----- ------        -----         
 service:halvm         grant-01            started       



[root@grant-01 ~]# lvs -a -o +devices
  LV             VG      Attr   LSize  Log      Copy%   Devices
  ha1            GRANT   Mwi-ao  8.00g ha1_mlog 100.00  ha1_mimage_0(0),ha1_mimage_1(0)
  [ha1_mimage_0] GRANT   iwi-ao  8.00g                  /dev/sdb1(0)
  [ha1_mimage_1] GRANT   iwi-ao  8.00g                  /dev/sdb2(0)
  [ha1_mlog]     GRANT   lwi-ao  4.00m                  /dev/sdc2(0)
  ha2            GRANT   Mwi-ao  8.00g ha2_mlog 100.00  ha2_mimage_0(0),ha2_mimage_1(0)
  [ha2_mimage_0] GRANT   iwi-ao  8.00g                  /dev/sdb1(2048)
  [ha2_mimage_1] GRANT   iwi-ao  8.00g                  /dev/sdb2(2048)
  [ha2_mlog]     GRANT   lwi-ao  4.00m                  /dev/sdc2(1)


[root@grant-01 ~]# pvmove -v /dev/sdb1 /dev/sdc1
    Finding volume group "GRANT"
    Archiving volume group "GRANT" metadata (seqno 8).
    Creating logical volume pvmove0
  Skipping mirror LV ha1
  Skipping mirror LV ha2
  Skipping mirror image LV ha1_mimage_0
  Skipping mirror image LV ha1_mimage_1
  Skipping mirror log LV ha1_mlog
  Skipping mirror image LV ha2_mimage_0
  Skipping mirror image LV ha2_mimage_1
  Skipping mirror log LV ha2_mlog
  All data on source PV skipped. It contains locked, hidden or non-top level LVs only.
  No data to move for GRANT

Comment 3 Corey Marthaler 2011-10-24 20:56:35 UTC
comment #2 was with rhel6.2 rpms.

2.6.32-209.el6.x86_64

lvm2-2.02.87-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011
lvm2-libs-2.02.87-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011
lvm2-cluster-2.02.87-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011
udev-147-2.40.el6    BUILT: Fri Sep 23 07:51:13 CDT 2011
device-mapper-1.02.66-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011
device-mapper-libs-1.02.66-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011
device-mapper-event-1.02.66-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011
device-mapper-event-libs-1.02.66-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011
cmirror-2.02.87-6.el6    BUILT: Wed Oct 19 06:46:31 CDT 2011

Comment 8 Alasdair Kergon 2013-03-21 12:34:26 UTC
Cross-reference: Bug 839796 (about moving raid volumes) is related.

Comment 9 Alasdair Kergon 2013-03-21 12:41:29 UTC
Cross-reference: bug 474650 is related (pvmove snapshots)

Comment 10 Alasdair Kergon 2013-03-21 12:44:39 UTC
This bug is specifically about tags with pvmove.

Please use the existing bug 474650 for the feature request for pvmove to support the moving of other LV types including mirrors.

Comment 12 Andrius Benokraitis 2013-10-15 19:29:19 UTC
No additional minor releases are planned for Production Phase 2 in Red Hat Enterprise Linux 5, and therefore Red Hat is closing this bugzilla as it does not meet the inclusion criteria as stated in:
https://access.redhat.com/site/support/policy/updates/errata/#Production_2_Phase


Note You need to log in before you can comment on or make changes to this bug.