Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 454645 - Bringing a snapshot of an LVM online on the same system
Summary: Bringing a snapshot of an LVM online on the same system
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2
Version: 5.2
Hardware: All
OS: Linux
low
medium
Target Milestone: beta
: 5.4
Assignee: Mike Snitzer
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-07-09 15:05 UTC by Jim Lester
Modified: 2015-06-29 17:59 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The LVM2 'vgimportclone' command adds support for importing duplicated Volume Groups which result from adding hardware snapshots (clones, copies, etc) to the system. Duplicate VG(s) and PV(s) are not able to be used until they are made to coexist with the origin VG(s) and PV(s). vgimportclone renames the VG associated with the specified PV(s) and changes the associated VG and PV UUIDs. vgimportclone allows users to resolve "Found duplicate PV" messages that are commonly seen when LVM2 commands are issued after a hardware snapshot is added to the system (via SCSI rescan).
Clone Of:
Environment:
Last Closed: 2009-09-02 11:57:27 UTC
Target Upstream Version:


Attachments (Terms of Use)


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

Description Jim Lester 2008-07-09 15:05:33 UTC
Description of problem:
Because of the unique ID associated with each LVM, it is a process to bring a
snapshot of an LVM online to the same server. Though it can be done, its a
lengthy processes and is not easily scriptable. What we would like to see is a
single command that could generate a new ID and append a unique modifier to the
LVM name so that the snapshot LVM can be brought back online quickly and easily. 

For our SAN (Compellent) at least, a new wwid is generated on the disk when a
view of a snapshot is created at mapped. Thus the disk is easily distinguishable
from just another path to the active LVM. It would be nice if the path to the
new drive didn't have to be specified to make scripting easier, but I don't know
if that's possible.

Bringing a snapshot online to the same server is something our customers like to
do for easy file recovery, integrity checks, and other recovery processes. 


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


How reproducible: Every time

Steps to Reproduce:
1. Create an LVM
2. Take a snapshot of the LVM volume
3. Present snapshot of LVM volume back to same server
4. Attempt to bring LVM online
  
Actual results:
LVM can not be brought online because the system already sees it as online.

Expected results:
As currently expected.

Additional info: None.

Comment 1 Mike Snitzer 2009-05-18 16:33:45 UTC
Upstream LVM2 now includes a 'vgimportclone' script that addresses this.  Release notes for 5.4 will be forthcoming.

Comment 2 Milan Broz 2009-05-21 09:22:03 UTC
Fix in version lvm2-2.02.46-1.el5.

Comment 4 Mike Snitzer 2009-05-21 21:46:20 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
The LVM2 'vgimportclone' command adds support for importing duplicated
Volume Groups which result from adding hardware snapshots (clones,
copies, etc) to the system.  Duplicate VG(s) and PV(s) are not able to
be used until they are made to coexist with the origin VG(s) and PV(s).
vgimportclone renames the VG associated with the specified PV(s) and
changes the associated VG and PV UUIDs.

vgimportclone allows users to resolve "Found duplicate PV" messages that
are commonly seen when LVM2 commands are issued after a hardware
snapshot is added to the system (via SCSI rescan).

Comment 5 Corey Marthaler 2009-07-02 15:54:56 UTC
The latest build of lvm2-2.02.46-8.el5 passes QA's beta regression tests,
however QA doesn't have specific hardware to test this feature other than what
was attempted in bug 504877.

Comment 8 errata-xmlrpc 2009-09-02 11:57:27 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.