Operating System - HP-UX
1753529 Members
4975 Online
108795 Solutions
New Discussion юеВ

HPUX 11.00: Restoring previous LVM information

 
SOLVED
Go to solution
LG Porter
Frequent Advisor

HPUX 11.00: Restoring previous LVM information

I have a HP K570 running HPUX 11.00. Recently I had to rebuild the OS using a make-recvoery tape that was several weeks old. Between the time that the make_recovery tape was created and the present date, I had created a new volume group and safed the files in the /etc/lvmconf location to a safe location prior to restoring the OS with the make_recovery tape. Is that a way I can restore the LVM structure (that is, let's used as example vg01, /dev/vg01 and associated character/block files location) with only the /etc/lvmconf/vg01.conf file? (The disks previously used for vg01 was deactivated prior to using the make_recovery tape and the data is still on the disk. I have a copy of the /etc/fstab as well as a previous "strings /etc/lvmtab".)
9 REPLIES 9
Pete Randall
Outstanding Contributor
Solution

Re: HPUX 11.00: Restoring previous LVM information

The way to do this would have been to export VG01 prior to the restore using vgexport with the -p option and the -m option to create a map file - then all you would have to do is import it.

You can still import it, though:

mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgimport -s /dev/vg01
vgchange -a y /dev/vg01

This will scan the physical volumes available for LVM information to select the proper PVs (the -s option) and use default lvol names (since we were unable to export to create a map file).


Pete


Pete
LG Porter
Frequent Advisor

Re: HPUX 11.00: Restoring previous LVM information

Hi Pete:

I did not make a map file prior to performing the restore....can the vgcfgrestore command be used if the chacter and block file where created manaully? (that is, mknod /dev/vg01/group c 64 0x010000, mknod /dev/vg01/d01 c 64 010001, mknod /dev/vg01/rd01 b 64 0x010001....)
Mark Grant
Honored Contributor

Re: HPUX 11.00: Restoring previous LVM information

I wouldn't want to disagree with Pete here so I'm probably wrong and he's probably right but I don't think you can vgimport -s if you didn't vgexport -s.

I think you might have to do a vgscan which will re-build yout /etc/lvmtab by looking at all the LVM data on the disks. Make a copy of your /etc/lvmtab file first though.

Just remember though, Pete is probably right :)
Never preceed any demonstration with anything more predictive than "watch this"
Pete Randall
Outstanding Contributor

Re: HPUX 11.00: Restoring previous LVM information

The vgcfgrestore command restores the LVM data to a physical volume. If I understand your situation correctly, that data should still be on your "vg01" disks. All you need to do is import the disks so your OS will recognize the VG.


Pete


Pete
Pete Randall
Outstanding Contributor

Re: HPUX 11.00: Restoring previous LVM information

Mark,

Thanks for the vote of confidence but I wouldn't be so sure.

L.G. - if the -s option won't work, you'll just have to list the paths to the physical disk in your vgimport command. Since you have that information for you "strings /etc/lvmtab", it shouldn't be too difficult in any case.


Pete


Pete
Robert-Jan Goossens
Honored Contributor

Re: HPUX 11.00: Restoring previous LVM information

LG Porter
Frequent Advisor

Re: HPUX 11.00: Restoring previous LVM information

I have recreated the LVM character and block devices files and was able to active the volume group and mount the file systems. Thanks
Pete Randall
Outstanding Contributor

Re: HPUX 11.00: Restoring previous LVM information

L.G.

I'm curious - how did you accomplish this?


Pete


Pete
Mark Grant
Honored Contributor

Re: HPUX 11.00: Restoring previous LVM information

Pete,

I did this two weeks ago too when a colleague had attempted to import a volume group but something had gone wrong. I couldn't see anything wrong and as a long shot, I just recreated the devices with "mknod" and the volume group activated after that.
Never preceed any demonstration with anything more predictive than "watch this"