Operating System - HP-UX
1752792 Members
6402 Online
108789 Solutions
New Discussion юеВ

Re: retrieve data of old disk vg00

 
Ceesjan van Hattum
Esteemed Contributor

retrieve data of old disk vg00

Hi,
I have a old disk with vg00 of HPUX10.20 which is not bootable.
I have also a running HPUX11 system (containing vg00 and vg01).
Now i need to retrieve some directories of the old disk, so i want to insert the disk and connect it maybe like a vg03, but what to do with double filesystemnames /var, /opt etcetera?
I've understood that vgimport is not the way, or is it?

Regards,
Ceesjan
18 REPLIES 18
John Palmer
Honored Contributor

Re: retrieve data of old disk vg00

Yes, you need to vgimport the disk as vg03 (or vg1020). You can then mount the filesystems as whetever you like, something like /oldvar /oldopt /oldroot etc.

Regards,
John
Xavier Gutierrez_1
Frequent Advisor

Re: retrieve data of old disk vg00

Hi, Ceesjan

It IS the way. You only need to vgimport the old vg00 with a minor number other than the minor of other VGs you already have in your system (if you plan to have it as vg03, choose 0x030000 as minor #).

Then the filesystems can be mounted elsewhere. For example:

mount /dev/vg03/lvol7 /old_var
^^^^^
You'll need to know the
exact structure, for sure.


Best regards.
Ceesjan van Hattum
Esteemed Contributor

Re: retrieve data of old disk vg00

What i did now is the following:

mkdir /dev/vg03
mknod /dev/vg03/group c 64 0x030000
vgcreate /dev/vg03 /dev/dsk/c0t3d0
for i in 1 2 3 4 5 6 7 8 9
do
mknod /dev/vg03/rlvol$i c 64 0x00000$i
mknod /dev/vg03/lvol$i b 64 0x00000$i
done
mknod /dev/vg03/rlvol10 c 64 0x00000a
mknod /dev/vg03/lvol10 b 64 0x00000a
mknod /dev/vg03/rlvol11 c 64 0x00000b
mknod /dev/vg03/lvol11 b 64 0x00000b

The 'ls -l' of the newly created vg03 looks exactly the same as the old system had as vg00.

Now i try to mount:
mkdir /oldcontrib
mount /dev/vg03/lvol11 /oldcontrib
/dev/vg03/lvol11: No such device or address

Where do i have to look for faults??

Joaquin Gil de Vergara
Respected Contributor

Re: retrieve data of old disk vg00

when you make the vgcreate the disk must be EMPTY and pvcreate-d

you need to make an vgimport to import LVM Data in disk to a VG

Probably disk is empty.... if not you can't make the vgcreate

Teach is the best way to learn
John Palmer
Honored Contributor

Re: retrieve data of old disk vg00

You ought to run vgimport, it would be much simpler...

mkdir /dev/vg03
mknod /dev/vg03/group c 64 0x030000
vgimport /dev/vg03 /dev/dsk/c0t3d0

However, if you want to do it your way, your mknod's should have a minor number of:

0x03000x not
0x00000x

Regards,
John
Ceesjan van Hattum
Esteemed Contributor

Re: retrieve data of old disk vg00

You're right.
(points will be rewarded later).
Now i have a /dev/vg03 in my /etc/lvmtab which i want to delete (vgremove).
But.. it needs to have the vg activated. But activation failes:
#vgchange -a y /dev/vg03
vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c0t3d0":
Cross-device link
vgchange: Warning: couldn't query physical volume "/dev/dsk/c0t3d0":
The specified path does not correspond to physical volume attached to this volume group vgchange: Warning: couldn't query all of the physical volumes.
vgchange: Couldn't activate volume group "/dev/vg03": Quorum not present, or some physical volume(s) are missing.

How can i delete the faulty vg03 ?
Ceesjan van Hattum
Esteemed Contributor

Re: retrieve data of old disk vg00

reply to my own question:
mv /etc/lvmtab /etc/lvmtab.old
vgscan -a

..still trying to vgimport.
Robert-Jan Goossens
Honored Contributor

Re: retrieve data of old disk vg00

Hi CeesJan,

Wy not remove the lvol's instead of removing the whole volume group.

Robert-Jan.
John Palmer
Honored Contributor

Re: retrieve data of old disk vg00

The quickest (and safest) way to remove the faulty VG is

vgexport vg03

Are you sure that c0t3d0 is the correct disk?

Regards,
John