NOTE:
Once the recovery is complete using the restore script, an immediate
vgversion
operation
in review mode will fail. You need to de-active the volume group and activate it again before
running
vgversion
in review mode. This reset of volume group is not needed for a
vgversion
operation not in review mode.
Adding a Disk to a Volume Group
Often, as new disks are added to a system, they must be added to an existing volume group rather
than creating a whole new volume group. If new disks are being added for user data, such as file
systems or databases, do not to add them to the root volume group. Instead, leave the root volume
group as only the disks containing the root file system and system file systems such as
/usr
,
/tmp
,
and so on.
To add a disk to a volume group, follow these steps:
1.
Initialize the disk as a physical volume by using the
pvcreate
command, as described in
“Initializing a Disk for LVM Use” (page 43)
.
2.
Add the physical volume to the volume group using the
vgextend
command and the block
device file for the disk. For example:
# vgextend /dev/vgname /dev/disk/disk3
Removing a Disk from a Volume Group
To remove a disk from a volume group, follow these steps:
1.
Make sure the disk has no assigned physical extents, using the
pvdisplay
command. For
example:
# pvdisplay /dev/disk/disk3
-- Physical volumes --
PV Name /dev/disk/disk3
VG Name /dev/vg00
PV Status available
Allocatable yes
VGDA 2
Cur LV 9
PE Size (Mbytes) 4
Total PE 1023
Free PE 494
Allocated PE 529
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On
Proactive Polling On
-- Distribution of physical volume --
LV Name LE of LV PE for LV
/dev/vg00/lvol1 25 25
/dev/vg00/lvol2 25 25
/dev/vg00/lvol3 50 50
--- Physical extents ---
PE Status LV LE
0000 current /dev/vg00/lvol1 0000
0001 current /dev/vg00/lvol1 0001
0002 current /dev/vg00/lvol1 0002
1021 free 0000
1022 free 0000
Common LVM Tasks
51