Operating System - Linux
1821639 Members
3325 Online
109633 Solutions
New Discussion юеВ

Change PV UUID on RedHat LVM2

 
Tom Dau
Occasional Contributor

Change PV UUID on RedHat LVM2

Hello,
I have one lvol on my Linux box. I create a snapshot of that lvol and map it to my Linux box. Now I see a second disk with the same info as my original disk. How can I mount this second disk to recover any file that I delete from my orignial disk. The snapshot was taken before any deletion. When I try to mount my snapshot lvol, it complains about not knowing filesystem type. When I add my second disk to my VG, it says it has the same PV UUID as my original. How can I mount my second disk in LVM. Output below. /dev/sdg5 is my original, sdh5 is my snapshot volume.

Thanks,

trnsrv1:/root# vgextend vgoracle /dev/sdh5
Found duplicate PV jiJsPUxyNN96eKPLs9eCc3tTf1qhkfdq: using /dev/sdh5 not /dev/sdg5
Physical volume '/dev/sdh5' is already in volume group 'vgoracle'
Unable to add physical volume '/dev/sdh5' to volume group 'vgoracle'.
===============================
trnsrv1:/root# pvchange -u /dev/sdh5
Found duplicate PV jiJsPUxyNN96eKPLs9eCc3tTf1qhkfdq: using /dev/sdg5 not /dev/sdh5
Found duplicate PV jiJsPUxyNN96eKPLs9eCc3tTf1qhkfdq: using /dev/sdh5 not /dev/sdg5
Volume group containing /dev/sdh5 has active logical volumes
0 physical volumes changed / 1 physical volume not changed

3 REPLIES 3
Ivan Ferreira
Honored Contributor

Re: Change PV UUID on RedHat LVM2

It will be more easy if you present the clone to another host and import the vg there. There are no easy solution today for this problem (FAIK).

The only one who knows that did something like this is this guy:

http://archives.free.net.ph/message/20061012.134242.7bcdd3ac.en.html
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Krastev
Honored Contributor

Re: Change PV UUID on RedHat LVM2

Tom Dau
Occasional Contributor

Re: Change PV UUID on RedHat LVM2

Thanks. The link you sent is unavailable.