HP-UX System Administrator's Guide: Logical Volume Management (762803-001, March 2014)

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.
3.3.4 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 46).
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
3.3.5 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
Check that the number of free physical extents (Free PE) matches the total number of physical
extents (Total PE). If they are not the same, do one of the following tasks:
54 Administering LVM