HP-UX HB v13.00 Ch-13 - LVM
HP-UX Handbook – Rev 13.00 Page 47 (of 110)
Chapter 13 LVM
October 29, 2013
# mknod /dev/vgDist/group c 64 0x030000
NOTE: Ensure that the 0x0#0000 minor number is unique for each VG on your
system.
# vgcreate -s 1 /dev/vgDist /dev/dsk/c0t0d0 /dev/dsk/c0t1d0 \
/dev/dsk/c1t2d0 /dev/dsk/c1t3d0
NOTE: The -s 1 in the above command specifies a PE size of 1 Mbyte. This is the
smallest stripe or extent size available. The default would be 4MB. This is only an
example, and the default or larger is appropriate in most cases.
2) Define PVGs
Physical volume groups can be created by using the "-g" option on the vgcreate and
vgextend commands, or by manually editing the /etc/lvmpvg file. Refer to lvmpvg(4)
man page for syntax.
Physical volume groups are used in conjunction with PVG-strict allocation policy.
PVG-strict allocation ensures that primary and mirror extents do not reside within
the same PVG. Typically each PVG consists of disk devices from the same
controller card or set of controllers. Another example would be the case where LVs
are mirrored between two separate disk arrays - the PVs in each of the arrays being
assigned to separate PVGs.
Example /etc/lvmpvg file:
VG /dev/vgDist
PVG PVG1
/dev/dsk/c0t0d0
/dev/dsk/c0t1d0
PVG PVG2
/dev/dsk/c1t2d0
/dev/dsk/c1t3d0
NOTE: Notice that both disk devices on the c0 controller card are put in PVG1 and
both devices on the c1 card are in PVG2. Extent distributed logical volumes within
vgDist will be assured to have one mirror copy spread across the disk devices on
the c0 controller and another mirrored copy striped across disk devices on the c1
controller card.
3) Create the distributed LV
# lvcreate -D y -s g -m 1 -L 1000 -n lvdist1 vgDist