You can select a particular target disk or disks, if desired. For example, to move all the physical
extents from c0t5d0 to the physical volume c0t2d0, enter the following command:
# pvmove /dev/dsk/c0t5d0 /dev/dsk/c0t2d0
The pvmove command succeeds only if there is enough space on the destination physical volumes to
hold all the allocated extents of the source physical volume. Before you move the extents with the
pvmove command, check the “Total PE” field in the pvdisplay source_pv_path command
output, and the “Free PE” field output in the pvdisplay dest_pv_path command output.
You can choose to move only the extents belonging to a particular logical volume. Use this option if
only certain sectors on the disk are readable, or if you want to move only unmirrored logical volumes.
For example, to move all physical extents of lvol4 that are located on physical volume c0t5d0 to
c1t2d0, enter the following command:
# pvmove -n /dev/vg01/lvol4 /dev/dsk/c0t5d0 /dev/dsk/c1t2d0
Note that pvmove is not an atomic operation, and moves data extent by extent. If pvmove is
abnormally terminated by a system crash or kill -9, the volume group can be left in an inconsistent
configuration showing an additional pseudo mirror 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.
Removing the Disk from the Volume Group
After the disk no longer holds any physical extents, you can use the vgreduce command to remove
the physical volume from the volume group so it is not inadvertently used again. Check for alternate
links before removing the disk, since you must remove all the paths to a multipathed disk. Use the
pvdisplay command as follows:
# pvdisplay /dev/dsk/c0t5d0 --- Physical volumes ---
PV Name /dev/dsk/c0t5d0
PV Name /dev/dsk/c1t6d0 Alternate Link
VG Name /dev/vg01
PV Status available
Allocatable yes
VGDA 2
Cur LV 0
PE Size (Mbytes) 4
Total PE 1023
Free PE 1023
Allocated PE 0
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On
In this example, there are two entries for PV Name. Use the vgreduce command to reduce each
path as follows:
# vgreduce vgname /dev/dsk/c0t5d0
# vgreduce vgname /dev/dsk/c1t6d0
If the disk is unavailable, the vgreduce command fails. You can still forcibly reduce it, but you must
then rebuild the lvmtab, which has two side effects. First, any deactivated volume groups are left out
of the lvmtab, so you must manually vgimport them later. Second, if any multipathed disks have
their link order reset, and if you arranged your pvlinks to implement load-balancing, you might have
to arrange them again.
Starting with the HP-UX 11i v3 release, there is a new feature introduced in the mass storage
subsystem that also supports multiple paths to a device and allows access to the multiple paths
simultaneously. If the new multi-path behavior is enabled on the system, and the imported volume
Kommentare zu diesen Handbüchern