NOTE:
The
pvmove
command is not an atomic operation; it moves data extent by extent. The
following might happen upon abnormal
pvmove
termination by a system crash or
kill -9
:
For Version 1.0 volume groups prior to the September 2009 Update, the volume group can be
left in an inconsistent configuration showing an additional pseudomirror copy for the extents being
moved. You can remove the extra mirror copy using the
lvreduce
command with the
–m
option
on each of the affected logical volumes; there is no need to specify a disk.
For version 1.0 with September 2009 Update or Version 2.0 volume groups: On abnormal
termination, the contiguous LV in question might have its extents laid out in a non-contiguous
manner. If so, it is recommended that you run
lvdisplay -v
to check if the allocation policy for
the LV is broken. If it is broken, then run the steps below to make contiguous the extents of this LV:
1.
Change the allocation policy of this LV to default (see lvchange(1M)).
2.
Move the extents such that all the physical extents of the logical volume are contiguous (see
pvmove(1M)).
3.
Change the allocation policy back to contiguous (see lvchange(1M).)
Moving Data for Disk Space Balancing: Auto Re-balancing
Definition
In this section, “balancing” refers to maintaining the percentage of free and used space on each
involved physical volume equal to the total percentage of free and used space on all the physical
volumes that are selected in the balance operation; calculations are based upon the number of
physical extents. Auto re-balancing refers to the automatic movement of extents based on the
optimal number of extents calculated automatically for each logical volume on each physical volume
involved in the re-balance operation. Beginning with the September 2009 Update of HP-UX, you
can achieve automatic re-balancing on Version 2.x volume groups using the
–a
option of the
pvmove
command.
Purpose
Balancing achieves better space utilization for existing storage, especially after physical volumes
have been recently added or deleted. Additionally, balancing can give better I/O performance
for the target logical volumes.
Usage
There are three different ways to use the
–a
option:
•
pvmove –a vg_name
all logical volumes within the volume group
vg_name
are auto re-balanced
•
pvmove –a lv_path [pv_path | pvg_name]
only the logical volumes specified by
lv_path
are auto re-balanced. They are balanced
across all the physical volumes within the volume group or the optional targets specified by
the physical volume
pv_path
or physical volume group
pvg_name
•
pvmove –a –f pv_path
all extents are moved from the physical volume
pv_path
to the remaining physical volumes
within the volume group; then, all logical volumes are re-balanced across those same remaining
physical volumes. You can use this when you want to remove or replace the physical volume
specified by
pv_path
.
Preview Mode
Before performing a
pvmove
for balancing, you can run a preview of the operation using the
–p
option. In addition, the
–s
option can be used to generate a preview summary report of the
requested re-balance without actually performing any move. The
–s
option is only valid with the
–p
and
–a
options. See the pvmove(1M) manpage for more details on the
pvmove
features.
Moving and Reconfiguring Your Disks
75