1752562 Members
4562 Online
108788 Solutions
New Discussion юеВ

Re: vgreduce

 
surendranath
Advisor

vgreduce

vgreduce -f /dev/vg01? I didnot see any changes been done to the volumegroup after running this command. Could some one please tell me the use of this command?.
7 REPLIES 7
john123
Trusted Contributor

Re: vgreduce

vgreduce -f /dev/vg01 is used for reduction of missing physical volume from a VG

Use man page for more details

Regards
John
Johnson Punniyalingam
Honored Contributor

Re: vgreduce

Hi Surendranath,

what error do you get.?

below are the Generic procedure to remove the vg

vgdisplay ├в v
If all logical volumes are gone from the volume group, remove the volume group
vgreduce
vgremove
rmsf /dev/
strings /etc/lvmtab ├в Make sure disks and volume group are gone

or

vgreduce -l /dev/vg01

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
sen_ux
Valued Contributor

Re: vgreduce

Hi,

See what man page says,

force reduction of missing physical volume(s) in a
given volume group. This option does not require
a physical volume (PV) to be supplied on the
command line. 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) or
lvremove(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. This option only works
on PVs and not on links.

Thanks
Sen
vjta
Regular Advisor

Re: vgreduce

Hi Surendranath,

vgreduce is the command to use for removing of missing PVs from a VG.

Also see man pages!!

Rgards
vjta
Vijeta Bhedi
sujit kumar singh
Honored Contributor

Re: vgreduce

hi


sen_ux gave a nice explanation of what vgreduce -f does.


#vgreduce -f /dev/ is for the reduction of the missing PVs from the VG

PVs that are missing shall get removed , u might require to do an lvreduce -m 0 /dev// to remove the PE mappings still associated with the missing PV.

#vgreduce -l /dev/vg02 /dev/dsk/c2t5d0

this will remove the missing path PV Links or extrs Alternate links from /etc/lvmatb or /etc/lvmtab_p as LVM supports total 8 paths for a PV ( 1 Prmary and 7 Alternate in LVM V1.0 VGs)

PV links will be removed only if the paths are sensed as missing.


REgards
Sujit
sujit kumar singh
Honored Contributor

Re: vgreduce

Hi


Apart from removing the missing PVs(#vgreduce -f /dev/vgXX) and the missing PV Links or paths(#vgreduce -l /dev/vg00 ) the command is used basically for the removal of a PV from the VG. But that PV should have the LVs lying on that also removed using lvremove prior to that.

Also this can be used to remove the Existing PV Links that is Alternate Paths to the PVs if wished.

for more can refer to the Manual page of the vgreduce(1M) coammand.

Please do not forget to assign points if the posts made to the thread have been helpful

Regards
Sujit
sdass
Advisor

Re: vgreduce

This is the procedure to remove the missing PV path from lvmtab

#vgreduce -f "vg name"
#mv /etc/lvmtab /etc/lvmtab.bkp
#vgscan -v

check the lvmtab if a new path is discovered The old missing path is replaced by new path

check the vg status with

vgdisplay -v "vg name"

if you have any error on the new path activate the pv path with the command

#pvchange -a y /dev/dsk/cxtxdx