Operating System - HP-UX
1753639 Members
5402 Online
108798 Solutions
New Discussion

Re: Removing a physical volume from a volume group

 
Gregsih
Occasional Visitor

Removing a physical volume from a volume group

Hello

I need to remove a 'ghost' physical volume from a violume group.

The volume group shows the following when vgcfgbackup is used:

# vgdisplay vg01
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c0t8d0":
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/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 4
Open LV 4
Max PV 16
Cur PV 6
Act PV 5
Max PE per PV 2171
VGDA 10
PE Size (Mbytes) 4
Total PE 10850
Alloc PE 8834
Free PE 2016
Total PVG 0

run:

vgreduce -f vg01

Couldn't open physical volume "/dev/rdsk/c0t8d0":

run:

mv /etc/lvmtab /etc/lvmtab.old

vgscan -v

Creating "/etc/lvmtab".
vgscan: Couldn't access the list of physical volumes for volume group "/dev/vg00".
vgscan: Couldn't access the list of physical volumes for volume group "/dev/vg01".
vgscan: Couldn't access the list of physical volumes for volume group "/dev/vg02".
Couldn't stat physical volume "/dev/dsk/c2t2d0":
Invalid argument


/dev/vg00
/dev/dsk/c0t5d0
/dev/dsk/c4t3d0

 

/dev/vg01
/dev/dsk/c0t9d0
/dev/dsk/c0t10d0
/dev/dsk/c1t8d0
/dev/dsk/c1t9d0
/dev/dsk/c4t4d0

 

Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c0t11d0
/dev/dsk/c0t10d0
/dev/dsk/c1t8d0
/dev/dsk/c1t9d0
/dev/dsk/c4t4d0

 

 

 

 

 

 

 

 

 

 

 

 

 

/dev/vg02
/dev/dsk/c1t10d0
/dev/dsk/c4t5d0


Scan of Physical Volumes Complete.

vgcfgbackup vg01
vgcfgbackup: Warning: couldn't query physical volume "":
The specified path does not correspond to physical volume attached to
this volume group
vgcfgbackup: Warning: couldn't query all of the physical volumes.
vgcfgbackup: Couldn't query physical volume "":
The specified path does not correspond to physical volume attached to
this volume group
vgcfgbackup: Couldn't query physical volume "":
The specified path does not correspond to physical volume attached to
this volume group

Any advice on this would be most welcome.

Further information:

Server is a HP 9000/871 running HP-UX 10.20 with no chance of upgrading.

This issue is causing the Ignite backup of the server to fail.

4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: Removing a physical volume from a volume group

Try using 'vgreduce -f'.

 

For example:

 

# vgreduce -f vg01

 

From the vgreduce man page:

 

-f vg_name

force reduction of missing physical volume(s) in a given volume group. vgreduce obtains the name of each physical volume (PV) belonging to the volume group from the file /etc/lvmtab. It then reads the LVM structures from each PV and compares these with that held by the kernel to work out which PVs are missing. PVs which are missing will be candidates for removal. If all the physical extents on the missing PV are free then it will be removed from the volume group. Otherwise vgreduce will report the physical to logical extent mapping. For missing PVs which have extents in use you must free up all the extents by using lvreduce(1M) and re-run vgreduce with the -f option. This option is most commonly used when
the vgdisplay(1M) command shows "Cur PV" higher than "Act PV" and all of the PVs belonging to the volume group are attached.

Gregsih
Occasional Visitor

Re: Removing a physical volume from a volume group

Sorry typo. I did run vgreduce -f vg01 with the results as shown.

Robert_Jewell
Honored Contributor

Re: Removing a physical volume from a volume group

How about just running:

 

# vgexport /dev/vg01

 

-Bob

----------------
Was this helpful? Like this post by giving me a thumbs up below!
Gregsih
Occasional Visitor

Re: Removing a physical volume from a volume group

Hi

Sorry for the delay in responding.  I have now managed to remove the c0t8do entry from the Logical Volume Group. The solution was not to move /etc/lvmtab but to copy it.

The issue now is that the PV c0t8d0 still exists in lvmtab and there appaers to be no command to remove it.

Even so we have some progress.