Configuring File System on HP-UX using LVM

1. Create Volume Group
Note: the following example is using the disk c0t3d5, the volume group vg01, the logical volume lvtest, and mount point /test

1.1 Identify the disks to be used for LVM  and create the missing device files

# insf -eC disk

# ioscan -nfC disk

1.2 Create a LVM data structure on each identified disk

# pvcreate /dev/rdsk/c0t3d5

Note: if the disk was previously used in another VG, use the following command instead:

# pvcreate -f /dev/rdsk/ c0t3d5

1.3 Collect all the physical volumes to form a new volume group

1.3.1 Go to dev directory (/dev)

# cd /dev

1.3.2 Create VG name

# mkdir vg01

1.3.3 Make directory and special file in VG

# mknod /dev/vg01/group c 64 0×010000

Note: the group number (last parameter – 0×010000 ) is in hexadecimal and should be different for each volume group

1.3.4 Create the volume group

# vgcreate -s [pe_size] -e [max_pe] /dev/vg01 /dev/dsk/ c0t3d5

Note: when a volume group is created without define pe_size and max_pe parameter, the maximum physical extents per volume (max_pe) will be set to the max_pe of the largest physical volume (PV). The effect of not setting the max_pe parameter would be that any PV added to the volume group in the future regardless of there size will be limited to the volume groug creation value of max_pe. Therefore, consider increasing the max_pe to accommodate PV’s that may likely be larger than the largest PV used to create the Volume Group. The formula to use to determine the value is:

physical_extent_size * max_pe = size_of_the_disk.

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.