HP-UX System Administrator's Guide: Logical Volume Management (5900-3028, March 2013)
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.
Example
Consider a volume group having the configuration below:
• Three physical volumes each of size 1245 extents:
/dev/disk/disk10, /dev/disk/disk11, and /dev/disk/disk12.
• Three logical volumes all residing on same disk, /dev/disk/disk10:
/dev/vg_01/lvol1 (Size = 200 extents),
/dev/vg_01/lvol2 (Size = 300 extents),
/dev/vg_01/lvol3 (Size = 700 extents).
The pvmove below generates a summary report to preview the re-balance of volume group vg_01:
# pvmove -p -s -a vg_01
--- Summary Report of re-balance operation ---
The optimal percentage of free space per PV = 68%
The optimal percentage of used space per PV = 32%
--- Before re-balance operation ---
The average percentage of free space on each PV =~ (68 +/- 32)%
The average percentage of used space on each PV =~ (32 +/- 32)%
--- After re-balance operation ---
The average percentage of free space on each PV =~ (68 +/- 0)%
The average percentage of used space on each PV =~ (32 +/- 0)%
The output above is interpreted as follows:
• The average percentage free space on each PV, before re-balance operation, is approximately
in the range of (68 - 32 =) 36% to (68 + 32 = ) 100% and after re-balance operation would
be approximately (68 +/- 0 =) 68%.
• The average percentage used space on each PV, before re-balance operation, is approximately
in the range of (32 - 32 = ) 0% to (32 + 32 =) 64% and after re-balance operation would be
approximately (32 +/- 0 =) 32%.
The pvmove command below actually moves the data for balancing:
# pvmove -a vg_01
Automatic re-balance operation successfully completed.
Moving and Reconfiguring Your Disks 75