lvreduce.1m (2010 09)
l
lvreduce(1M) lvreduce(1M)
le_number must be at least 1 and no greater than a volume group version-
dependent maximum; use the lvmadm command to determine the maximum
number of logical extents for the volume group version.
One, and only one,
-l, -L,or
-m option must be supplied.
-L lv_size Decrease the space allocated to the logical volume, specified in megabytes.
lv_size is a decimal value smaller than the current logical volume size.
lv_size must be at least 1 and no greater than a volume group version-
dependent maximum; use the
lvmadm command to determine the maximum
size for the volume group version.
lv_size is rounded up to the nearest multiple of the logical extent size,
equivalent to the physical extent size defined for the volume group by the
vgcreate command (see vgcreate (1M)).
One, and only one,
-l, -L
,or-m option must be specified.
-m mirror_copies Reduce the number of mirror copies allocated for each logical extent. A mirror
copy contains the same data as the original. mirror_copies must be at least 0
and smaller than the volume group version-dependent maximum; use the
lvmadm command to determine the maximum number of mirror copies for the
volume group version. mirror_copies must be smaller than the current value.
If optional pv_path arguments are specified, the mirror copies are deallocated
from the specified physical volumes.
One, and only one,
-l, -L,or-m option must be specified.
-k This option should be used only in the special instance when you want to
reduce a mirrored logical volume on a physical volume that is missing or has
failed. Use lvdisplay -v -k to obtain the pvkey (Physical Volume
Number in VG).
Use this option with the
-m option.
Shared Volume Group Considerations
For volume group version 1.0 and 2.0,
lvreduce cannot be used if the volume group is activated in
shared mode. For volume groups version 2.1 (or higher), lvreduce can be performed when activated in
either shared, exclusive, or standalone mode.
Note that the
lvmpud daemon must be running on all the nodes sharing a volume group activated in
shared mode. See lvmpud(1M).
LVM shared mode is currently only available in Serviceguard clusters.
EXTERNAL INFLUENCES
Environment Variables
LANG determines the language in which messages are displayed.
If
LANG is not specified or is null, it defaults to "C" (see lang (5)).
If any internationalization variable contains an invalid setting, all internationalization variables default
to "C" (see environ (5)).
EXAMPLES
Decrease the number of the logical extents of a logical volume to one hundred:
lvreduce -l 100 /dev/vg01/lvol3
Reduce to one mirror (that is, an original and one copy) for each logical extent of a logical volume:
lvreduce -m 1 /dev/vg01/lvol5
Remove mirror copies of logical extents of a logical volume from the physical volume
/dev/dsk/c1t0d0:
lvreduce -m 0 /dev/vg01/lvol4 /dev/dsk/c1t0d0
Remove a logical volume from a one-way mirrored set on the specified pvkeys:
2 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: September 2010