Bug 1171805
Summary: | vgimportclone doesn't work in RHEL 6.6 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Konstantin Volkov <wolf> | ||||||||
Component: | lvm2 | Assignee: | Peter Rajnoha <prajnoha> | ||||||||
lvm2 sub component: | Scripts / lvmdump / vgimportclone (RHEL6) | QA Contact: | cluster-qe <cluster-qe> | ||||||||
Status: | CLOSED ERRATA | Docs Contact: | |||||||||
Severity: | high | ||||||||||
Priority: | high | CC: | agk, heinzm, jbrassow, msnitzer, nperic, prajnoha, prockai, zkabelac | ||||||||
Version: | 6.6 | ||||||||||
Target Milestone: | rc | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | x86_64 | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | lvm2-2.02.117-1.el6 | Doc Type: | Bug Fix | ||||||||
Doc Text: |
The vgimportclone script makes some assumptions about the content of the lvm2 configuration file(s) on the system. In some cases, one or more of these assumptions is false and may cause the script to fail. We have rewritten the problematic portion of the script to make it more robust. In technical terms, we now use a new 'dumpconfig' feature to manipulate the configuration file instead of 'awk'.
|
Story Points: | --- | ||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2015-07-22 07:37:54 UTC | Type: | Bug | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
Konstantin Volkov
2014-12-08 16:18:33 UTC
1) Please supply the output of 'bash -x vgimportclone...' 2) Please supply a copy of your LVM configuration file(s) e.g. /etc/lvm/lvm.conf You could also run with -d and look for the files in the temporary subdirectory it uses. Created attachment 966196 [details]
lvm.conf
Created attachment 966197 [details]
vzimportclone
vzimportclone.log
Created attachment 966200 [details]
vgimportclone-d.log
vgimportclone-d.log
Thanks for that - I've reproduced this. Since that script was written, we've enhanced 'dumpconfig' and might be able to use a new option instead of the 'awk' which is going wrong. As a workaround, try uncommenting the line in lvm.conf: filter = [ "a/.*/" ] (but there are several problems with the awk statement) This patch replaces the awk with dumpconfig to generate temporary lvm.conf for use in vgimportclone script: https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=00b36ef06acb15c82d7c9b37872753f02c638316 There was also another bug and that is the vgimportclone did not call pvscan --cache to notify lvmetad about changes if lvmetad is used: https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=b21a8412c482ae735d0d044d355e1541ccba6edf [root@tardis-02 fd]# lvcreate -L3G -n volume vg Logical volume "volume" created. [root@tardis-02 fd]# dd if=/dev/sdb2 of=/dev/sdc2 39054015+0 records in 39054015+0 records out 19995655680 bytes (20 GB) copied, 315.655 s, 63.3 MB/s [root@tardis-02 fd]# pvs -a -o+pv_uuid Found duplicate PV Sf85Osj554iody2xe3aHN8LJp3ihjfL7: using /dev/sdc2 not /dev/sdb2 PV VG Fmt Attr PSize PFree PV UUID /dev/sdb2 --- 0 0 Sf85Os-j554-iody-2xe3-aHN8-LJp3-ihjfL7 /dev/sdb3 --- 0 0 /dev/sdb5 --- 0 0 /dev/sdb6 --- 0 0 /dev/sdc1 --- 0 0 /dev/sdc2 vg lvm2 a-- 18.62g 15.62g Sf85Os-j554-iody-2xe3-aHN8-LJp3-ihjfL7 [root@tardis-02 fd]# vgimportclone -n oldvg /dev/sdc2 Found duplicate PV Sf85Osj554iody2xe3aHN8LJp3ihjfL7: using /dev/sdc2 not /dev/sdb2 WARNING: Activation disabled. No device-mapper interaction will be attempted. Physical volume "/tmp/snap.pzwaQnM1/vgimport0" changed 1 physical volume changed / 0 physical volumes not changed WARNING: Activation disabled. No device-mapper interaction will be attempted. Volume group "vg" successfully changed Volume group "vg" successfully renamed to "oldvg" Reading all physical volumes. This may take a while... Found volume group "oldvg" using metadata type lvm2 Found volume group "vg" using metadata type lvm2 Found volume group "vg_tardis02" using metadata type lvm2 [root@tardis-02 fd]# echo $? 0 [root@tardis-02 fd]# vgs VG #PV #LV #SN Attr VSize VFree oldvg 1 1 0 wz--n- 18.62g 15.62g vg 1 1 0 wz--n- 18.62g 15.62g vg_tardis02 1 3 0 wz--n- 278.88g 0 [root@tardis-02 fd]# lvs -a LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert volume oldvg -wi------- 3.00g volume vg -wi-a----- 3.00g Marking VERIFIED with: lvm2-2.02.118-1.el6.x86_64 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1411.html |