Act PV 1
Max PE per PV 2000
VGDA 2
PE Size (Mbytes) 4
Total PE 249
Alloc PE 170
Free PE 79
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 1082g
VG Max Extents 69248
The
Free PE
entry indicates the number of 4 MB extents available, in this case, 79 (316
MB).
3.
Extend the logical volume. For example:
# lvextend -L 332 /dev/vg00/lvol7
This increases the size of this volume to 332 MB.
NOTE:
On the HP-UX 11i v3 March 2010 Update, the size of a logical volume cannot be
extended if it has snapshots associated with it. With the HP–UX 11i v3 September 2010 Update,
this limitation is removed; and logical volumes with snapshots can be extended.. For information
about snapshot logical volumes, see
“Creating and Administering Snapshot Logical Volumes”
(page 103)
.
Extending a Logical Volume to a Specific Disk
For performance reasons, you can force a logical volume to span disks. For example, if you want
to create a 30 GB logical volume and put 10 GB on the first disk, another 10 GB on the second
disk, and 10 GB on the third disk, then assuming that the extent size is 4 MB, the logical volume
requires a total of 7680 extents. To extend the logical volume, follow these steps:
1.
After making the disks physical volumes and creating your volume group, create a logical
volume named
lvol1
of size 0. For example:
# lvcreate -n lvol1 /dev/vg01
2.
Allocate a third of the extents to the logical volume on the first physical volume. For example:
# lvextend -l 2560 /dev/vg01/lvol1 /dev/disk/disk7
3.
Increase the total number of physical extents allocated to the logical volume for the remaining
physical volumes by 2560. In each case, the additional 2560 extents are allocated to the
disk specified. For example:
# lvextend -l 5120 /dev/vg01/lvol1 /dev/disk/disk8
# lvextend -l 7680 /dev/vg01/lvol1 /dev/disk/disk9
When you use the
-l
option with
lvextend
, you specify space in logical extents.
For another example, you have two disks in a volume group, both identical models. You currently
have a 24 GB logical volume that resides on only one of the disks. You want to extend the logical
volume size to 40 GB and ensure that the 16 GB increase is allocated to the other disk.
Extend the logical volume to a specific disk as follows:
# lvextend -L 40960 /dev/vg01/lvol2 /dev/disk/disk3
Here, when you use the
-L
option (uppercase), you specify space in megabytes, not logical extents.
For complete information on command options, see lvextend(1M).
54
Administering LVM