vgchgid(1M) vgchgid(1M)
NAME [Toc] [Back]
vgchgid - modify the Volume Group ID (VGID) on a given set of physical
devices
SYNOPSIS [Toc] [Back]
/usr/sbin/vgchgid PhysicalVolumePath [PhysicalVolumePath] ...
DESCRIPTION [Toc] [Back]
The vgchgid command is designed to change the LVM Volume Group ID
(VGID) on a supplied set of disks. vgchgid will work with any type of
storage, but it is primarily targeted at disk arrays that are able to
create "snapshots" or "clones" of mirrored LUNs. vgchgid accepts a
set of raw physical devices and checks the following criteria before
it alters the VGID:
+ All raw physical volume devices in the command line have the same
disk type, such as:
1) EMC Symmetrix disks with the BCV attribute. (See EMC
documentation.)
2) The XP disk array family with BC_SVOL or CA_SVOL attributes.
(See XP256/XP512 related documentation.)
+ All raw physical volume devices in the command line belong to the
same VG. (See WARNINGS section.)
Once the checks are successful, the same VGID is set on all the disks.
It should be noted that for multi-PV volume groups all the physical
volumes should be split off and supplied in a single invocation of the
vgchgid command.
Options [Toc] [Back]
vgchgid recognizes the following options and arguments:
PhysicalVolumePath The raw devices path name of a physical
volume.
Background [Toc] [Back]
Both the EMC and XP disk arrays have a feature which allows a user to
split off a set of mirror copies of physical volumes (termed BCVs or
BCs) just as LVM splits off logical volumes with the lvsplit command.
As the result of the "split," the split-off devices will have the same
VGID as the original disks. vgchgid is needed to modify the VGID on
the BCV devices. Once the VGID has been altered, the BCV disks can be
imported into a new volume group by using vgimport.
WARNINGS [Toc] [Back]
Once the VGID has been changed, the original VGID is lost until a disk
device is re-mirrored with the original devices. If vgchgid is used
on a subset of disk devices (e.g., two out of four disk devices), the
two groups of disk devices would not be able to be imported into the
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
vgchgid(1M) vgchgid(1M)
same VG since they have different VGIDs on them. The solution is to
re-mirror all four of the disk devices and re-run vgchgid on all four
BCV devices at the same time, and then use vgimport to import them
into the same new VG.
If a disk is newly added to an existing volume group and no subsequent
LVM operations has been performed to alter the structures (i.e.,
operations which perform an automated vgcfgbackup(1M)); then it is
possible a subsequent vgchgid will fail. It will report that the disk
does not belong to the volume group. This may be overcome by
performing a structure changing operation on the volume group (for
example, using lvcreate).
It is the system administrator's responsibility to make sure that the
devices provided in the command line are all Business Copy volumes of
the existing standard physical volumes and are in the ready state and
writeable. Mixing the standard and BC volumes in the same volume
group can cause data corruption.
RETURN VALUE [Toc] [Back]
vgchgid returns the following values:
0 VGID was modified with no error
1 VGID was not modified
EXAMPLES [Toc] [Back]
An example showing how vgchgid might be used:
1. The system administrator uses the following commands to create the
Business Continuity (BCV or BC) copy:
1) For EMC Symmetrix disks, the commands are BCV establish and
BCV split.
2) For XP disk array, the commands are paircreate and pairsplit.
Three BCV disks are created.
2. Change the VGID on the BCV disks.
vgchgid /dev/rdsk/c0t0d0 /dev/rdsk/c0t0d1 /dev/rdsk/c0t0d2
3. Make a new volume group using the BCV disks.
mkdir /dev/vgbcv
mknod /dev/vgbcv/group c 64 0x040000
4. Import the BCV disks into the new volume group.
vgimport /dev/vgbcv /dev/dsk/c0t0d0 /dev/dsk/c0t0d1 /dev/dsk/c0t0d2
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003
vgchgid(1M) vgchgid(1M)
5. Activate the new volume group.
vgchange -a y /dev/vgbcv
6. Backup the new volume group's LVM data structure.
vgcfgbackup /dev/vgbcv
7. Mount the associated logical volumes.
mkdir /bcv/lvol1 /bcv/lvol2
mount /dev/vgbcv/lvol1 /bcv/lvol1
mount /dev/vgbcv/lvol2 /bcv/lvol2
SEE ALSO [Toc] [Back]
vgimport(1M), vgscan(1M), vgcfgbackup(1M).
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: August 2003 [ Back ] |