Operating System - HP-UX
1825512 Members
1921 Online
109681 Solutions
New Discussion юеВ

Unable to remove non-existant pv from vg

 
SOLVED
Go to solution
Mark Everett
Advisor

Unable to remove non-existant pv from vg

Greetings,

I am unable to remove a non-existant physical volume from a volume group. Why do I need to remove a pv that does not exist you say? Somewhere during the installation and configuration of an external disk array, the device table appears to have become corrupt.

My system complains loudly that physical volume '/dev/dsk/c5t0d0' cannot be queried, or removed. The physical disk/address truly does not exist, but I am unable to properly bring the system back to reality using vgreduce or vgremove.

'strings /etc/lvmtab' shows the "ghost" device.
'ioscan -C disk' returns the correct info.

System: HP-UX v11.0 will updated patches on rp5470 and A5272 external disk array.

Thanks,

-Mark

ctatmp2[225]$ vgdisplay /dev/vgext
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c5t0d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.


ctatmp2[226]$ pvdisplay /dev/dsk/c5t0d0
pvdisplay: Warning: couldn't query physical volume "/dev/dsk/c5t0d0":
The specified path does not correspond to physical volume attached to
this volume group
pvdisplay: Warning: couldn't query all of the physical volumes.
pvdisplay: Couldn't retrieve the names of the physical volumes
belonging to volume group "/dev/vgext".
pvdisplay: Cannot display physical volume "/dev/dsk/c5t0d0".

ctatmp2[227]$ pvremove /dev/dsk/c5t0d0
pvremove: Couldn't open physical volume "/dev/dsk/c5t0d0":
No such device or address

ctatmp2[235]$ vgreduce -f /dev/vgext
vgreduce: Couldn't query physical volume "/dev/dsk/c5t0d0":
The specified path does not correspond to physical volume attached to
this volume group

ctatmp2[228]$ strings /etc/lvmtab
/dev/vg00
/dev/dsk/c2t0d0
/dev/vg01
/dev/dsk/c1t0d0
/dev/vg02
/dev/dsk/c2t2d0
/dev/vg03
/dev/dsk/c1t2d0
/dev/vgext
/dev/dsk/c4t0d0
/dev/dsk/c4t2d0
/dev/dsk/c4t3d0
/dev/dsk/c4t8d0
/dev/dsk/c4t9d0
/dev/dsk/c4t10d0
/dev/dsk/c4t11d0
/dev/dsk/c4t12d0
/dev/dsk/c4t13d0
/dev/dsk/c5t0d0
6 REPLIES 6
Steve Steel
Honored Contributor

Re: Unable to remove non-existant pv from vg

Hi

There are a couple of ideas that you could rebuild.Please study and see if this works for you.

a. vgchange -a n
b. vgexport -m
c. Recreate the group file for the volume group:
mkdir /dev/
mknod /dev//group c 64 0xXX0000 (where XX represents a unique
minor number)
d. vgimport -m pv_path ...
e. vgchange -a y

Then


f. vgreduce -f
g. mv /etc/lvmtab /etc/lvmtab.old
h. vgscan -v
i. vgcfgbackup


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Helen French
Honored Contributor

Re: Unable to remove non-existant pv from vg

This could be a possible solution:

# mv /etc/lvmtab /etc/lvmtab.old
# vgscan -a
Life is a promise, fulfill it!
Dave Wherry
Esteemed Contributor
Solution

Re: Unable to remove non-existant pv from vg

I recently had this same problem.
Follow Steve's solution, steps A,B & C. On step D, only include the pv_path of the disks you want in the volume group. Do not bring the ghost back in. Then finish with steps E & I. You're done.
You will not need steps F, G or H.
Mark Everett
Advisor

Re: Unable to remove non-existant pv from vg

The suggested reconstruction procedures were successful. The device table has returned to reality and I now have a fully funcitonal disk array with volumes and filesystems.

Thanks much for all the replies.

I also manage Solaris, AIX, Tru64 UNIX, IRIX, Linux and DYNIX/ptx and this is by far the most helpful forum on the net!
Changchun Teng
Advisor

Re: Unable to remove non-existant pv from vg

How about vg00? That is, if one of the root vg's pv is missed. How to remove the pv from the system configuration?