Re: how to change the volume group name of the attached backup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> 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


      


_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux