Managing Systems and Workgroups: A Guide for HP-UX System Administrators

Administering a System: Managing Disks and Files
Managing File Systems
Chapter 6604
If you decide not to use a logical volume when creating a file system, skip
steps 1 through 4 below, which deal with logical volumes only. Refer to
the book Disk and File Management Tasks on HP-UX for more
information on creating a file system within a disk section or a whole
disk.
Step 1. Estimate the Size Required for the Logical Volume
To estimate the size needed for a logical volume that will contain a file
system, see “Setting Up Logical Volumes for File Systems” on page 563.
Step 2. Determine If Sufficient Disk Space Is Available
To determine if there is sufficient disk space available for the logical
volume within its volume group, use the vgdisplay command to
calculate this information. vgdisplay will output data on one or more
volume groups, including the physical extent size (under PE Size
(Mbytes)) and the number of available physical extents (under Free
PE). By multiplying these two figures together, you will get the number of
megabytes available within the volume group. See vgdisplay (1M) for
more information.
Step 3. Add a Disk to a Volume Group
If there is not enough space within a volume group, you will need to add
a disk to a volume group.
NOTE For information on configuring the disk to your system and determining
the physical address of the disk, see Configuring HP-UX for Peripherals.
To add a disk to an existing volume group, use pvcreate (1M) and
vgextend (1M). You can also add a disk by creating a new volume group
with pvcreate (1M) and vgcreate (1M).
Step 4. Create the Logical Volume
Use lvcreate to create a logical volume of a certain size in the above
volume group. See lvcreate (1M) for details.