An LVM system starts by initializing disks for
LVM usage. An LVM disk is known as a physical volume (PV). A disk is marked as an LVM physical volume using either the
HP System Management Homepage (HP SMH) or the pvcreate command. Physical volumes use the same device special files as traditional
HP-UX disk devices.
LVM divides each physical volume into addressable
units called physical extents (PEs). Starting
after the LVM metadata at the beginning of the disk, extents are allocated
sequentially, with an index starting at zero and incrementing by one
for each unit. The physical extent size is configurable at the time
you form a volume group and applies to all disks in the volume group.
You can select a size from 1 MB to 256 MB.
Physical volumes are organized into volume groups (VGs). A volume
group can consist of one or more physical volumes, and there can be
more than one volume group in the system. Once created, the volume
group, not the disk, is the entity that represents data storage. Thus,
whereas earlier you moved disks from one system to another, with LVM,
you move a volume group from one system to another. Therefore, it
is often convenient to have multiple volume groups on a system.
The pool of disk space that is represented by
a volume group can be divided into logical volumes (LVs) of various sizes. Once created,
logical volumes can be treated just like disk partitions. They are
accessible through device special files. A logical volume can span
a number of physical volumes in a volume group or represent only part
of one physical volume.
The basic allocation units for a logical volume
are called logical extents (LEs). A logical
extent is mapped to a physical extent. Thus, if the physical extent
size is 4 MB, the logical extent size is also 4 MB. The size of a
logical volume is determined by the number of logical extents configured.
You assign file systems, swap, dump, or raw data
to logical volumes. For example, in Figure 1-1, logical volume /dev/vg01/lvol1 might contain a file system, logical volume /dev/vg01/lvol2 might contain swap space, and logical volume /dev/vg01/lvol3 might contain raw data. You can use HP SMH to create a file system
in a logical volume of a specified size, then mount the file system.
Alternately, you can use LVM commands to create, then extend a logical
volume to allocate sufficient space for file systems or raw data.
You then create and mount new file systems or install your application
in the logical volume.
Figure 1-1 Disk Space Partitioned Into Logical Volumes