Advertisements

HP-UX: LVM – Failure possibly caused by PVG-Strict or Distributed allocation policies

Tried to create a logical volume and HP-uX gave an error message

root@hpux:~ # lvcreate -s g -D y -r N -L 400000 -n lvsapdata8 /dev/vgLP0data
Warning: The “-r” option has been ignored as it is not supported
for volume group version 2.0 or higher
Logical volume “/dev/vgLP0data/lvsapdata8” has been successfully created with
character device “/dev/vgLP0data/rlvsapdata8”.
lvcreate: Not enough free physical extents available.
Logical volume “/dev/vgLP0data/lvsapdata8” could not be extended.
Failure possibly caused by PVG-Strict or Distributed allocation policies.

The problem was the combination of strict allocation policy and distributed allocation. Since I had 7 disks in the volume group and a new disk was added, this logical volume creation was not meeting the options set

-s strict Set the strict allocation policy. Mirror copies
of a logical extent can be allocated 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.

-D distributed Set the distributed allocation policy.
distributed can have one of the following
values:

y Turn on distributed allocation.

n Turn off distributed allocation. This is
the default.

When the distributed allocation policy is turned
on, only one free extent is allocated from the
first available physical volume. The next free
extent is allocated from the next available
physical volume. Allocation of free extents
proceeds in round-robin order on the list of
available physical volumes.

When the distributed allocation policy is turned
off, all available free extents are allocated
from each available physical volume before
proceeding to the next available physical
volume. This is the default.

The distributed allocation policy REQUIRES the
PVG-strict allocation policy (-s g) to ensure
that mirrors of distributed extents do not
overlap (for maximum availability).

lvcreate(1M) will obtain the list of available
physical volumes from /etc/lvmpvg. See
vgextend(1M) for more information on physical
volume groups and /etc/lvmpvg.

When a logical volume with distributed extents
is mirrored, the resulting layout is commonly
referred to as EXTENT-BASED MIRRORED STRIPES.

Note that EXTENT-BASED MIRRORED STRIPES can be
created without the distributed allocation
policy by adding one extent at a time to the
desired physical volumes through lvextend(1M).

The distributed allocation policy is
incompatible with the striped scheduling policy
(-i stripes) and the contiguous allocation
policy (-C y).

The lvchange(1M) command can be used to assign
the distributed allocation policy to an existing
logical volume.

See lvdisplay(1M) for display values.

See EXAMPLES.

Advertisements
%d bloggers like this: