1819791 Members
3103 Online
109607 Solutions
New Discussion юеВ

Restore LVM on boot disk

 
SOLVED
Go to solution
Sergey Polyakoff
Occasional Contributor

Restore LVM on boot disk

I have system K220 with 4 4gb disks. All disks managed by LVM. I try to install fresh copy of HP-UX 10.20. Before install, I remove 3 disks (with system) from scsi interface. After successful installation I try to mount old system disk using SAM. ( I don't save Volume Group configuration to file on another system (tape, disk). ) SAM show me that this disk used by SDS and SAM can't use it. I remove SDS... After That I try to boot from old system disk and can't do this. Can I hope to restore LVM cofiguration or any data? If yes, why?
Sergey Polyakoff
2 REPLIES 2
Stefan Farrelly
Honored Contributor
Solution

Re: Restore LVM on boot disk


Boot from your new system disk with the old system disk also connected. Then create a new volume group;
mkdir /dev/vg00_old
mknod /dev/vg00_old/group c 64 0x080000
vgimport /dev/vg00_old /dev/dsk/c

This will import the old system disk's lvm info to vg00_old, and all the lvols should now appear in /dev/vg00_old (lvols1-9?). Now you can mount any of them anywhere you want and pull off the old data (remember what type each lvol is; lvol2 should be swap so you cant mount that one, lvol1 will be hfs, lvol3-9 vxfs etc.)
Im from Palmerston North, New Zealand, but somehow ended up in London...
Insu Kim
Honored Contributor

Re: Restore LVM on boot disk

Perform vgimport for old root disk, then mount it and get information that you want.

Generally, if you want to restore only volume group information from old root disk, you don't need to do import old root disk.
Simply doing vgimport for each data disk will bring you back your data.
It works.

# mkdir /dev/vgXX
# mknod /dev/vgXX/group c 64 0x0Y0000
# vgimport /dev/vgXX /dev/dsk/cXtYdZ
# vgchange -a y /dev/vgXX
# mkdir
# mount -a
Never say "no" first.