All of lore.kernel.org
 help / color / mirror / Atom feed
From: chris procter <chris-procter@talk21.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] how to change the volume group name of the attached backup
Date: Thu, 18 Mar 2010 20:57:44 +0000 (GMT)	[thread overview]
Message-ID: <370327.39654.qm@web87113.mail.ird.yahoo.com> (raw)
In-Reply-To: <20100318145652.GB32200@redhat.com>

>> Hi,

>> 
>> I have a 2 Linux(RHL) machines (L1 and L2).  One is clone of other. I have 
>> taken the backup of a L1. Now I have attached that backup to L2.
>> 
>> Before attaching L2 has /dev/sda and after attatchement it has /dev/sdb
>> 
>> But I cant mount /dev/sdb as it is on LVM. As both are having same VG
>> NAME I can't even mount logical volume.
>> 
>> So I thought to change the volume group name of the 
>> second but not able to do that.
>>
>> My intention is to mount the backup of L1 in L2 to check all data are
>> 
>> correct.
>> 
>> Need your help to solve it.

>Please see: man vgimportclone
>
>Though vgimportclone is only provided in newer versions of lvm2 
> (>= 2.02.46).
>
>Mike

Just to expand on Mikes comments, you'll have two volume groups with the same name, but lvm thinks its just seeing the same vg twice because they both have the same uuid, and it will think sda and sdb are two paths to the same device because they have the same uuid as well.  

The good news is this is exactly the situation vgimportclone was written to solve so running something like (read the man page first, its good, Mike wrote it!)
#  vgimportclone -n MYNEWVG /dev/sdb 
should fix things for you.

The other bit of good news is that while vgimportclone only comes with versions of lvm >= 2.02.46 I think it  works on any RHEL 5.x  (it was written on rhel 5.0 iirc but I can't remember the lvm version)  so if you can get a copy from cvs or somewhere you should be ok.

If your using rhel 4 or earlier then you have a problem, but if you can present the clone to another machine (L3 :)  and run vgimportclone then present it back to L2 that should work.  Theres a bug somewhere in the rhel 4 version of lvm that means it doesn't respect changes to LVM_SYSTEM_DIR. 

chris


      

  reply	other threads:[~2010-03-18 20:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18 14:43 [linux-lvm] how to change the volume group name of the attached backup Sarkar, Kaushik
2010-03-18 14:56 ` Mike Snitzer
2010-03-18 20:57   ` chris procter [this message]
2010-03-18 15:15 ` Andreas Olsowski
2010-03-18 15:32   ` Mike Snitzer
  -- strict thread matches above, loose matches on Subject: below --
2010-04-01 10:05 Sarkar, Kaushik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=370327.39654.qm@web87113.mail.ird.yahoo.com \
    --to=chris-procter@talk21.com \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.