Bug 504877 - RFE - clean up vgimportclone output issues
Summary: RFE - clean up vgimportclone output issues
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Mike Snitzer
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-09 21:09 UTC by Corey Marthaler
Modified: 2015-06-29 18:00 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 11:57:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
verbose log from simple pv/vg example (66.71 KB, text/plain)
2009-06-09 21:29 UTC, Corey Marthaler
no flags Details
verbose log from simple pv/vg example (with -d output) (70.34 KB, text/plain)
2009-06-09 21:32 UTC, Corey Marthaler
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1393 0 normal SHIPPED_LIVE lvm2 bug-fix and enhancement update 2009-09-01 12:00:22 UTC

Description Corey Marthaler 2009-06-09 21:09:35 UTC
Description of problem:
I attempted this cmd on some devices that didn't actually have any hardware snapshots.

[root@taft-02 ~]# pvscan
  PV /dev/sdb1   VG taft         lvm2 [135.66 GB / 135.66 GB free]
  PV /dev/sdc1   VG taft         lvm2 [135.66 GB / 135.66 GB free]
  PV /dev/sdd1   VG taft         lvm2 [135.66 GB / 135.66 GB free]
  PV /dev/sda2   VG VolGroup00   lvm2 [68.12 GB / 0    free]

[root@taft-02 ~]# vgimportclone -n clone -t /dev/sdb1
Volume Group taft incomplete, skipping.
Volume Group device,unknown exported, skipping.
Volume Group device,/tmp/snap.Csmf7429/vgimport0, exported, skipping.
  Reading all physical volumes.  This may take a while...
  Found volume group "taft" using metadata type lvm2
  Found volume group "VolGroup00" using metadata type lvm2
  You have a memory leak (not released memory pool):
   [0xc944680]
  You have a memory leak (not released memory pool):
   [0xc944680]

# Shouldn't see "memory leak" messages.


[root@taft-02 ~]# vgimportclone -n clone -t /dev/foobar
Fatal: /dev/foobar is not a block device.

# It'd be nice to see an error stating that "/dev/sdf1" 
is not in a VG, similar to the above message about block
devices, but that's certainly a really low priority.
[root@taft-02 ~]# vgimportclone -n clone -t /dev/sdf1
Fatal: Specified PV(s) () don't belong to a VG.


Version-Release number of selected component (if applicable):
lvm2-2.02.46-5.el5

How reproducible:
Everytime

Comment 1 Corey Marthaler 2009-06-09 21:14:02 UTC
Tried this with as simple a vg as possible and saw the same errors.

[root@taft-02 ~]# pvscan
  PV /dev/sdb1   VG VG           lvm2 [135.66 GB / 135.66 GB free]
  PV /dev/sda2   VG VolGroup00   lvm2 [68.12 GB / 0    free]
  Total: 2 [203.79 GB] / in use: 2 [203.79 GB] / in no VG: 0 [0   ]
[root@taft-02 ~]# vgs
  VG         #PV #LV #SN Attr   VSize   VFree  
  VG           1   0   0 wz--n- 135.66G 135.66G
  VolGroup00   1   2   0 wz--n-  68.12G      0 
[root@taft-02 ~]# vgimportclone -n clone -t /dev/sdb1
  WARNING: Activation disabled. No device-mapper interaction will be attempted.
  Test mode: Metadata will NOT be updated.
  Physical volume "/tmp/snap.DlRV7969/vgimport0" changed
  1 physical volume changed / 0 physical volumes not changed
  WARNING: Activation disabled. No device-mapper interaction will be attempted.
  Test mode: Metadata will NOT be updated.
  Volume group "VG" successfully changed
  Test mode: Metadata will NOT be updated.
  Volume group "VG" successfully renamed to "clone"
  Reading all physical volumes.  This may take a while...
  Found volume group "VG" using metadata type lvm2
  Found volume group "VolGroup00" using metadata type lvm2
  You have a memory leak (not released memory pool):
   [0x83e9680]
  You have a memory leak (not released memory pool):
   [0x83e9680]

Comment 2 Corey Marthaler 2009-06-09 21:29:36 UTC
Created attachment 347094 [details]
verbose log from simple pv/vg example

Comment 3 Corey Marthaler 2009-06-09 21:32:05 UTC
Created attachment 347095 [details]
verbose log from simple pv/vg example (with -d output)

Comment 5 Mike Snitzer 2009-06-17 21:29:18 UTC
I've committed various vgimportclone fixes to upstream's LVM2 cvs:

- validate the specified device is a PV and that it is in a VG
- automatically enable DEBUG (-d) if >= 4 -v instances were supplied
- preserve TMP_LVM_SYSTEM_DIR if it contains an lvm.conf and -d was
  specified
- fix handling of special-case where PV is listed as "unknown device"
- more descriptive error when a PV is missing ("unknown device")
- unset LVM_SYSTEM_DIR if it was not originally set
- skip final vgscan if no changes were made

Milan will be rolling these changes into the next 5.4 Beta rpm.

Comment 6 Milan Broz 2009-06-18 11:12:02 UTC
Fix in lvm2-2.02.46-8.el5.

Comment 9 Corey Marthaler 2009-06-18 16:03:12 UTC
Fix verified in lvm2-2.02.46-8.el5.

[root@taft-02 ~]# pvscan
  PV /dev/sdd1   VG taft            lvm2 [135.66 GB / 135.66 GB free]
  PV /dev/sda2   VG VolGroup00      lvm2 [68.12 GB / 0    free]
  PV /dev/sde1                      lvm2 [135.67 GB]
  PV /dev/sdf1                      lvm2 [135.67 GB]
  PV /dev/sdg1                      lvm2 [135.67 GB]
  PV /dev/sdh1                      lvm2 [135.67 GB]
  Total: 6 [746.45 GB] / in use: 2 [203.79 GB] / in no VG: 4 [542.66 GB]

[root@taft-02 ~]# vgimportclone -n clone -t /dev/sdd1
  WARNING: Activation disabled. No device-mapper interaction will be attempted.
  Test mode: Metadata will NOT be updated.
  Physical volume "/tmp/snap.CtH10118/vgimport0" changed
  1 physical volume changed / 0 physical volumes not changed
  WARNING: Activation disabled. No device-mapper interaction will be attempted.
  Test mode: Metadata will NOT be updated.
  Volume group "taft" successfully changed
  Test mode: Metadata will NOT be updated.
  Volume group "taft" successfully renamed to "clone"
  Reading all physical volumes.  This may take a while...
  Found volume group "taft" using metadata type lvm2
  Found volume group "VolGroup00" using metadata type lvm2

[root@taft-02 ~]# vgimportclone -n clone -t /dev/sdh1
Fatal: /dev/sdh1 is not in a VG.

Comment 11 errata-xmlrpc 2009-09-02 11:57:31 UTC
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-2009-1393.html


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