NAME [Toc] [Back]
vgextend - extend an LVM volume group by adding physical volumes
SYNOPSIS [Toc] [Back]
/usr/sbin/vgextend [-f] [-A autobackup] [-g pvg_name]
[-x extensibility] [-z sparepv] vg_name pv_path ...
Remarks [Toc] [Back]
vgextend cannot be performed if the volume group is activated in shared
DESCRIPTION [Toc] [Back]
The vgextend command assigns additional physical volumes to volume
group vg_name. The volume group must be active.
Volume groups are extended by adding one or more physical volumes
specified by pv_path ...
After the physical volumes have been successfully added to the volume
group, the disk space they contain can be allocated to logical
Before assigning an additional physical volume to a volume group,
create the physical volume with the pvcreate command (see
pvcreate(1M)). Then, create the volume group with the vgcreate
command, assigning at least one physical volume (see vgcreate(1M)).
If, for any reason, a specified physical volume cannot be installed
into the volume group, an error message is displayed. However, the
installation continues to the end of the list of physical volumes.
When a pv_path refers to one of the physical volumes already in the
volume group by a different pv_path name to indicate the use of a
different controller, this new path becomes an alternate link to the
physical volume. When two paths that reference the same disk are
provided in the pv_path list, the order of the paths is important.
The first path becomes the "primary link" to the physical volume, the
second becomes an "alternate link" to the physical volume. The
primary link is the path used to access the physical volume unless the
primary link becomes unavailable in which case LVM automatically
switches to the alternate link to access the physical volume.
Currently LVM supports a maximum of 8 paths to a physical volume (7
alternates and one primary).
Options and Arguments [Toc] [Back]
vgextend recognizes the following options and arguments:
pv_path The block device path name of a physical
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
vg_name The path name of the volume group.
-A autobackup Set automatic backup for this invocation of
this command. autobackup can have one of the
y Automatically back up configuration
changes made to the volume group.
This is the default.
After this command executes, the
vgcfgbackup command (see
vgcfgbackup(1M)) is executed for
the volume group.
n Do not back up configuration
changes this time.
-f This option will force a volume group to be
extended with a physical volume which has
alternate block(s) already allocated, (i.e.
this physical volume was not initialized
using pvcreate -f.) This option should be
used with extreme caution. If the disk is
being extended to a volume group with a
different physical extent size, the alternate
block(s) might be inside the user data area.
Potential data corruption could occur.
-g pvg_name Extend an existing physical volume group
while the volume group is being extended by
adding all the physical volumes in the
pv_path parameter to the physical volume
group specified by pvg_name.
If the specified physical volume group does
not exist, it is created, thus providing a
means for creating new physical volume groups
after the volume group has been created.
Another way to extend or add a physical
volume group is to edit the /etc/lvmpvg file
as described in vgcreate(1M). See lvmpvg(4)
for format details.
-x extensibility Set allocation permission for additional
physical extents on the physical volume
specified by pv_path. extensibility can have
one of the following values:
y Allow allocation of additional
physical extents on the physical
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003
n Prohibit allocation of additional
physical extents on the physical
volume. Logical volumes residing
on the physical volume can still be
-z sparepv This option requires the installation of the
optional HP MirrorDisk/UX software. It allows
you to mark the physical volume(s) specified
by pv_path to be either a spare physical
volume or a regular, non-spare physical
volume. (A spare physical volume can be used
to replace an existing physical volume within
a volume group when mirroring is in effect,
in the event the existing physical volume
fails.) sparepv can have one of the following
y The physical volume(s) will be used
as spare(s). No physical extents
from a spare physical volume will
be available as part of the "free"
pool of extents in the volume
group. The spare physical volume(s)
will only be used in the event of
another physical volume within this
volume group becomes unavailable
n The physical volume(s) will be used
as regular, non-spare members of
the volume group. This is the
EXTERNAL INFLUENCES [Toc] [Back]
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 [Toc] [Back]
Add physical volumes /dev/dsk/c0t1d0 and /dev/dsk/c0t2d0 to volume
vgextend /dev/vg03 /dev/dsk/c0t1d0 /dev/dsk/c0t2d0
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: August 2003
Extend physical volume group PVG0 while adding physical volumes
/dev/dsk/c0t3d0 and /dev/dsk/c0t4d0 to volume group /dev/vg03:
vgextend -g PVG0 /dev/vg03 /dev/dsk/c0t3d0 /dev/dsk/c0t4d0
Add an alternate link to one of the physical volumes in the volume
group where /dev/dsk/c0t4d0 and /dev/dsk/c1t4d0 refer to the same
physical volume (referenced via different controllers), and the volume
group already contains /dev/dsk/c0t4d0. /dev/dsk/c0t4d0 remains the
primary link (in use) and /dev/dsk/c1t4d0 becomes the alternate link.
vgextend /dev/vg03 /dev/dsk/c1t4d0
Add a spare physical volume to a volume group:
vgextend -z y /dev/vg03 /dev/dsk/c2t4d0
WARNINGS [Toc] [Back]
The new physical volume which has been added to the volume group could
potentially have a different block size compared to physical volumes
already in the volume group.
If a logical volume is created on two or more physical volumes which
have a different block size, it is not possible to use such logical
volume for file system purposes. See extendfs(1M).
For example, when a logical volume contains physical volumes that all
have 1k block size, and then it is extended to contain a physical
volume with 2k block size, then the block size of the volume group is
increased to 2k.
ADDITIONAL WARNINGS [Toc] [Back]
Starting at 10.20, the vgextend command is supporting additional EMC
Symmetrix disk product functionality (see vgchgid(1M)). The vgextend
command will be enforcing a new rule such that a physical device, to
be extended to a volume group, must have the same EMC Symmetrix
attributes as the physical volumes already in the volume group.
Clearly this checking only applies if the disks involved (those
already in the volume group and those being added) in the operation
are EMC Symmetrix. Should the command find an incompatibility, a
message of the following type will be produced:
"Attempt to mix incompatible EMC Symmetrix disk types failed.
Volume group contains standard disks, but physical volume
/dev/dsk/cxtxdx contains EMC BCV DISK. Please consult the EMC
Symmetrix documentation, if applicable".
SEE ALSO [Toc] [Back]
pvchange(1M), pvcreate(1M), vgchange(1M), vgcreate(1M), vgdisplay(1M).
Hewlett-Packard Company - 4 - HP-UX 11i Version 2: August 2003 [ Back ]