vgreduce.1m (2010 09)

v
vgreduce(1M) vgreduce(1M)
NAME
vgreduce - remove physical volumes from an LVM volume group
SYNOPSIS
/usr/sbin/vgreduce
[-A autobackup ] vg_name pv_path ...
/usr/sbin/vgreduce
[-A autobackup ][-l
] vg_name pv_path
/usr/sbin/vgreduce
[-A autobackup ][-f] vg_name
DESCRIPTION
The
vgreduce command removes each physical volume specified by a pv_path argument from volume
group vg_name.
The
vgreduce command with -f option removes all missing physical volumes from the volume group.
All but one physical volume can be removed. The last physical volume must remain in the volume group
so that the logical volume driver can continue to operate. The last physical volume in the volume group
can be removed with the
vgremove command (see vgremove (1M)).
Before executing
vgreduce, remove all logical volumes residing on each physical volume represented by
a pv_path by executing the lvremove command (see lvremove (1M)).
Any physical volume in the pv_path list that is also a member of a physical volume group (as defined in
/etc/lvmpvg) is also removed from the physical volume group. If the physical volume happens to be
the last one in the physical volume group, the physical volume group is also removed from the volume
group.
When a physical volume in the pv_path list has multiple PV-links, the physical volume is not removed
from the volume group until all the links to the volume are removed. When a physical volume in the
pv_path list is the primary link (in use) to a physical volume, removing the link forces LVM to switch to
the alternate link (For information on alternate links, see lvm(7)). When the pv_path removed is an
alternate link to the device, only the link is removed; the volume group and physical volume are other-
wise unchanged.
When a physical volume is added into volume groups version 2.0 or higher, the number of physical
extents available on this device will be added into Total PE of the volume group (see vgdisplay (1M)). If
the size of physical volume is such that Total PE would exceed the VG Max Extents of the volume group,
the number of physical extents available on this device will be reduced accordingly (see vgextend (1M)). If
a subsequent
vgreduce, on a different physical volume, frees up space, then the number of extents allo-
cated to the partial physical volume is automatically increased. Under these circumstances the
vgreduce command will display the old and the new values for the Total PE count for this partial phy-
sical volume (see pvdisplay(1M)).
Options and Arguments
vgreduce recognizes the following options and arguments:
-A autobackup
Set automatic backup for this invocation of this command. autobackup can have
one of the following values:
y Automatically back up configuration changes made to the volume group. This
is the default.
After this command executes, the
vgcfgbackup command (see
vgcfgbackup (1M)) is executed for the volume group.
n Do not back up configuration changes this time.
-f vg_name Force the reduction of missing physical volumes from the specified volume group.
vgreduce obtains the name of each physical volume (PV) belonging to the volume
group. It then reads the kernel PV structures 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.
If the missing PV of a volume group with version 2.2 or higher has pre-allocated
extents,
vgreduce will also report such physical extents.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (4 pages)