Operating System - HP-UX
1833576 Members
3677 Online
110061 Solutions
New Discussion

Re: LVM disk contains data .... how to recover

 
hp_user_1
Regular Advisor

LVM disk contains data .... how to recover

Hi,

I have a PV which was part of an unknown vg from a server that no longer exist. The PV contains data and I want to recover it. There exists no backups.

Please help...
3 REPLIES 3
Denver Osborn
Honored Contributor

Re: LVM disk contains data .... how to recover

Import a VG that contains the one PV w/ your data and try to salvage what is there, if anything,

# mkdir /dev/vgtest01
# mknod /dev/vgtest01/group c 64 0x040000

where "0x04" is unique to anyother existying VG's. (ll /dev/*/group to check)

# vgimport /dev/vgtest01 /dev/dsk/cXtXdX
The import could complain VG contains X PVs but only 1 specified...
# vgchange -a y -q n /dev/vgtest01
# ll /dev/vgtest01 -> is there an lvol? (lvol1)

If there's and lvol,
what type of filesystem...

# fstyp /dev/vgtest01/rlvol1
# fsck -F vxfs /dev/vgtest01/rlvol1

you should get the idea of where I'm going w/ this... If you're lucky any lvols on that PV wouldn't have spanned multiple PV's in the original VG.

When you're done, unmount the filesystem, deactivate the Vg and vgexport /dev/vgtest01 (if/when you won't need it on there anymore)

Hope this helps and good luck,
-denver
Stf
Esteemed Contributor

Re: LVM disk contains data .... how to recover

That's the way but you could also do it by sam :

Disks and File Systems -> Volume groups
Action -> Import
and it shows you what he found onto PV...

Stf ;-)
Devender Khatana
Honored Contributor

Re: LVM disk contains data .... how to recover

Hi,

You should do it through command line. Reason being that you do not know this VG has how many disks and SAM will give quorum error if this VG has more that one disks.

HTH,
Devender
Impossible itself mentions "I m possible"