Bug 504877 - RFE - clean up vgimportclone output issues
RFE - clean up vgimportclone output issues
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2 (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: Mike Snitzer
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-09 17:09 EDT by Corey Marthaler
Modified: 2015-06-29 14:00 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 07:57:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Corey Marthaler 2009-06-09 17:09:35 EDT
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 17:14:02 EDT
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 17:29:36 EDT
Created attachment 347094 [details]
verbose log from simple pv/vg example
Comment 3 Corey Marthaler 2009-06-09 17:32:05 EDT
Created attachment 347095 [details]
verbose log from simple pv/vg example (with -d output)
Comment 5 Mike Snitzer 2009-06-17 17:29:18 EDT
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 07:12:02 EDT
Fix in lvm2-2.02.46-8.el5.
Comment 9 Corey Marthaler 2009-06-18 12:03:12 EDT
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 07:57:31 EDT
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.