HP-UX Reference (11i v2 07/12) - 1M System Administration Commands A-M (vol 3)
l
lvcreate(1M) lvcreate(1M)
-s strict Set the strict allocation policy. Mirror copies of a logical extent can be allo-
cated to share or not share the same physical volume or physical volume
group. strict can have one of the following values:
y Set a strict allocation policy. Mirrors of a logical extent cannot share
the same physical volume. This is the default.
g Set a PVG-strict allocation policy. Mirrors of a logical extent cannot
share the same physical volume group. A PVG-strict allocation policy
cannot be set on a logical volume in a volume group that does not
have a physical volume group defined.
n Do not set a strict or PVG-strict allocation policy. Mirrors of a logical
extent can share the same physical volume.
Striped Logical Volume Considerations
Striped and mirrored logical volumes are supported. A logical volume striped across stripes physical
volumes is allocated in sets of stripes logical extents. A set corresponds to stripes physical extents if the
volume is not mirrored or to stripes *(mirror_copies + 1) physical extents if the volume is mirrored. stripes
is the number of physical volumes the logical volume is striped across. It is set with the option
-i stripes.
mirror_copies is the number of mirror copies allocated for each logical extent. It is set with the
-m option.
The user data is striped across stripes physical extents of the set, and each of these extents is mirrored on
mirror_copies other physical extents of the same set. Striped logical volumes are only allocated using the
strict or PVG-strict allocation policies. Each physical extent of a given set is allocated on a different physi-
cal volume in the volume group.
The total number of physical extents of a striped logical volume is always a multiple of stripes (or stripes *
(mirror_copies + 1) if the volume is mirrored).
A minimum of stripes (or stripes *(mirror_copies + 1) if the volume is mirrored) physical volumes with ade-
quate free space and meeting the allocation policy is needed to allocate a striped logical volume.
EXTERNAL INFLUENCES
Environment Variables
LANG determines the language in which messages are displayed.
If LANG is not specified or is null, it defaults to "C" (see lang(5)).
If any internationalization variable contains an invalid setting, all internationalization variables default to
"C" (see environ(5)).
EXAMPLES
Create a logical volume in volume group
/dev/vg02:
lvcreate /dev/vg02
Create a logical volume in volume group /dev/vg03 with non-strict allocation policy:
lvcreate -s n /dev/vg03
Create a logical volume of size 100 MB in volume group /dev/vg03 :
lvcreate -L 100 /dev/vg03
Create a logical volume of size 90 MB striped across 3 disks with a stripe size of 64 KB:
lvcreate -L 90 -i 3 -I 64 /dev/vg03
Create a logical volume of size 90 MB striped across 3 disks with one mirror copy and a stripe size of 64
KB:
lvcreate -L 90 -i 3 -I 64 -m 1 /dev/vg03
Distributed Allocation Policy
This example shows how the -D y option can be used to create EXTENT-BASED MIRRORED STRIPES.
Assume that volume group /dev/vgtest has two physical volume groups: pvg1 and pvg2.
Assume that each physical volume group has 2 physical volumes.
Assume that the first physical volume in each pvg has 3 extents free and the second physical volume in
each pvg has 2 extents free.
HP-UX 11i Version 2: December 2007 Update − 4 − Hewlett-Packard Company 525