Operating System - HP-UX
1831276 Members
2692 Online
110022 Solutions
New Discussion

LVM disk structure recovery

 
SOLVED
Go to solution
jose da silva
Frequent Advisor

LVM disk structure recovery

pvcreate -f was done on the wrong lun " disk ". Is there any way to recover LVM structure "the BDRA, VGID etc" from the disk? Is the data completely lost ?
11 REPLIES 11
Torsten.
Acclaimed Contributor

Re: LVM disk structure recovery

You can try a "vgcfgrestore ...".


Guess why pvcretae gives an error when using without "-f" on a LVM disk...

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
jose da silva
Frequent Advisor

Re: LVM disk structure recovery

Thanks Torston

That seemed to work it looks like it recovered the Volume structure but we cannot access the data. Any ideas ?
Torsten.
Acclaimed Contributor

Re: LVM disk structure recovery

Is it a mirrored disk?

Did you restore the *.old configuration file?


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
jose da silva
Frequent Advisor

Re: LVM disk structure recovery

Yes it was a mirrored volumegroup, unfortunatly the pvcreate -f was done on both disk devices.
vgcfgrestore was done and completed successfully but still having problems accessing the data.
Torsten.
Acclaimed Contributor

Re: LVM disk structure recovery

It is important to restore the *.old configuration file, because the other backup file has the same information like the disk currently has. So you probably loose the information about the LVOLs completely.

What does "vgdisplay -v" and pvdisplay tell you?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Sujit
Advisor

Re: LVM disk structure recovery


In your case, It is impossible to recover the data. You need to restore from latest backup.
jose da silva
Frequent Advisor

Re: LVM disk structure recovery

See atatched vgdisplay etc.
HP-UX_Ali
Regular Advisor
Solution

Re: LVM disk structure recovery

Hi Silva,
After vgcfgrestore, replace the old configuration file. once this is done do vgscan and possible do fsck on it.
then try to mount all volumes by mount -a.

Do the above excercise, should have recover the data.

Regards
Ali.
RajuD
Frequent Advisor

Re: LVM disk structure recovery

can you please post the pvdispaly -v output on the disk you have given pvcreate.
“Education is our passport to the future, for tomorrow belongs to those who prepare for it today.”
Kapil Jha
Honored Contributor

Re: LVM disk structure recovery

how did you run vgcfgrestore
and what is the error coming now, did you do it while the vg was online??

did you try to run vgscan after words, probably move the old lvmtab file and do vgscan.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
jose da silva
Frequent Advisor

Re: LVM disk structure recovery

Hi All

Thank you for the valuable information which helped in solving the issue. I run vgcfgrestore and vgscan. I also had to do a restore from backup and this solved the problem.