My tape backup contains /etc/lvmtab, /etc/lvmconf, etc. (OS stuff)
everything but the data that I need most from this bad disk.
Since I already reconfigured LVM for /dev/vg01/lv01, though, I'd like
to check if it's possible to undo my config. such that this old disk
data can be accessed as before by restoring some metadata stuff (maybe
/etc/lvmconf files?) from my tape backup.
Thank you for your help in advance!!!
- Young
To undo your work (remove a vg from a system) use vgexport.
To have the system (try to) import the disk, use vgimport. You have to
mkdir, mknod, & chmod the vg files first.
Google "lvm reccovery"or "lvm cookbook". Although many of the hits were
Linux related, many of the techniques work in HPUX.
What is your exact configuration?
How did you remove the old disk and install the new one?
Is there only one disk in vg01?
Is there only one lv in vg01?
You probley DON'T need to vgexport the new volume group. What you do
need to will depend on what you did and what your hardware configuration
is.
It may be as simple as reconnecting the old drive, then
mkdir /dev/vg02
mknod /dev/vg02/group -c 64 0x020000
vgscan -v
vgimport vg02 /dev/dsk/c...
vgchange -a y vg02
mount /dev/vg02/lvol1 /...
You may need to do a vgchid, but that is doubtful.
Robert Klute
The opinions are those of the poster, not the company.
Hi, thanks for your suggestion!
I restored my original /etc/lvmtab file & /etc/lvmconf directory and
then got the following:
(I'm trying to get back /dev/vg01 with /dev/dsk/c0t1d0)
# vgimport vg01 /dev/dsk/c0t1d0
vgimport: Volume group "/dev/vg01" already exists in the "/etc/lvmtab"
file.
# vgscan -v
vgscan: Warning: couldn't query physical volume "/dev/dsk/c0t1d0":
The specified path does not correspond to physical volume attached to
this volume group
vgscan: Warning: couldn't query physical volume "/dev/dsk/c0t3d0":
The specified path does not correspond to physical volume attached to
this volume group
vgscan: Warning: couldn't query all of the physical volumes.
vgscan: Couldn't access the list of physical volumes for volume group
"/dev/vg03".
vgscan: The physical volume "/dev/dsk/c0t1d0" is already recorded in
the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c0t3d0" is already recorded in
the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c0t4d0" is already recorded in
the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c0t5d0" is already recorded in
the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c0t6d0" is already recorded in
the "/etc/lvmtab" file.
Couldn't stat physical volume "/dev/dsk/c0t2d0":
Invalid argument
Couldn't stat physical volume "/dev/dsk/c0t3d0":
Invalid argument
/dev/vg01
/dev/dsk/c0t1d0
/dev/vg02
/dev/dsk/c0t4d0
/dev/vg00
/dev/dsk/c0t5d0
/dev/dsk/c0t6d0
The Volume Group /dev/vg03/group was not matched with any Physical
Volumes.
Scan of Physical Volumes Complete.
# vgdisplay /dev/vg01
vgdisplay: Volume group not activated.
vgdisplay: Cannot display volume group "/dev/vg01".
Any advice?
Thank you in advance!
- Young
OK, since you restored you original lvmtab and lvmconf, you basically
restored the old vg01 back as vg01. The error message is saying that
vg01 is not activated.
So, at this point you would do the vgchange -a y vg01 (to activate it),
mount your vg01 lvol, and copy the data you want from that drive to a
safe place. Then unmount vg01, de-activate it, export it, attach the
new drive, make the /dev/vg01 directory, mknod group, import the new
drive as vg01, activate it, mount it, and copy the files you saved off
over to the new vg01.
My instructions for making a different volume assumed you would be able
to attach the old vg01 drive without having to remove the new vg01.
That being physically possible, you would have been able to have both
mounted at the same time and been able to selectively copy files
directly from the old disk to the new one.
Robert
The opinions expressed are those of this poster and in no way reflect
the opinions, advise, or recommendations of the company he works for.