LVM Configuration corrupted

Occasional Contributor

LVM Configuration corrupted


i have a problem where the system cannot detect the volume group (/dev/vg00).

when i did the : ioscan -funC disk , i can see the 2 disk /dev/dsk/c0t5d0 and /dev/dsk/c0t8d0

but when i did the : vgdisplay -v /dev/vg00 or pvdisplay , the system didn't responde, no error or any output.

i biggest problem is i don't have any backup for the kernel or the ignite.

all these problem occured when the primary disk (/dev/dsk/c0t5d0) failed, : vgreduce /dev/vg00 /dev/dsk/c0t5d0

and i replace with another old system disk from another machine, and did the : vgextend /dev/vg00 /dev/dsk/c0t5d0 ; mkboot /dev/rdsk/c0t5d0 ; mkboot -a "hpux (;0) /stand/vmunix" /dev/rdsk/c0t5d0

Con O'Kelly
Honored Contributor

Re: LVM Configuration corrupted


It sounds like you may have missed a step as you need to restore the LVM information to the disk:
# vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t5d0
# vgchange -a y

Then run your mkboot commands.

Then sync the LV's
# vgsync vg00

Presumably your system has booted off the alternate disk.

Occasional Contributor

Re: LVM Configuration corrupted

i have found the problem where :

some of the files in /usr/sbin corrupted ( no idea how) but after i replace it from another similar machine, i can see the vgdisplay or pvdisplay.

but when i did the
mv lvmtab lvmtab.20Jul04
vgscan -v -a , it return as

Couldn't stat physical volume "/dev/dsk/c1t2d0":
Invalid argument


any idea how to remove the /dev/dsk/c1t2d0

Steve Post
Trusted Contributor

Re: LVM Configuration corrupted

Could it be that the c1t2d3 is a cdrom?

(I don't remember exactly the name of the device file you are talking about. I know it was not c0t5d0 or c0t8d0. )
Bharat Katkar
Honored Contributor

Re: LVM Configuration corrupted

It looks like LVM info on /dev/dsk/c0t5d0
is corrupted or disk(PV) gone bad. See the status with "ioscan -fnC disk", whether it displays this disk.

"vgcfgrestore" could have worked for you properly. Well if you want to remove PV from the VG use "vgreduce" command.

See man vgreduce, vgcfgrestore

You need to know a lot to actually know how little you know

Re: LVM Configuration corrupted


Like Bharat said, do a vgreduce if you are sure the disk device file name it is complaining about is hard disk drive and not any other device.

If vgreduce doesn't work, then force it with

vgreduce -f

The above should work in removing a missing physical volume from a VG.

Please let us know if you were able to resolve it ?

Rita C Workman
Honored Contributor

Re: LVM Configuration corrupted

If the above fixed your problem..ok...
But if your still having issue...could you run this for me:

echo "0x2008?4D" | adb /dev/dsk/c-t-d-

Do this for all the disks on vg00. Then compare the last field and see if they match. If they do...than the disks know they are part of the same vgid. If they don't...well that is a whole 'nother fix.

Let us know,
Occasional Contributor

Re: LVM Configuration corrupted


/dev/dsk/c1t2d0 is a cdrom

and problem is more like this

# vgdisplay
vgdisplay: Warning: couldn't query physical volume "":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
--- Volume groups ---
VG Name /dev/vg00

it seems like in /dev/vg00 there is another disk but with any pv and this guy have mirror to /dev/dsk/c0t5d0 and /dev/dsk/c0t8d0
New Member

Re: LVM Configuration corrupted

This is a great discussion. Bhanu you point is valid!! ex-roommate from Atlanta!

Re: LVM Configuration corrupted

Please try the following
Boot the machine in maintanance mode
ISl>hpux -lm
#mv /etc/lvmtab /etc/lvmtab/org
#vgimport /dev/vg00 /dev/dsk/c0t5d0
#strings /etc/lvmtab ?does it show as following
if yes import other vgs manually(by vgimport command ) or try vgscan after copying the new lvmtab to a safe place.