physical extents on that disk to any other disks in the volume group, subject to any mirroring allocation policies.
For example:
# pvmove pvname
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
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 it 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 the 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, any multipathed disks have their link order reset; if you arranged
your pvlinks to implement load-balancing, you might have to arrange them again. The procedure to remove the
disk and rebuild lvmtab is as follows:
14
Comentarios a estos manuales