United States-English |
|
|
HP-UX Reference > Vvgchange(1M)HP-UX 11i Version 3: February 2007 |
|
NAMEvgchange — set LVM volume group availability SYNOPSISActivate volume group/usr/sbin/vgchange -a availability [-l] [-p] [-q quorum] [-s] [-P resync_daemon_count] [vg_name...] Set volume group high-availability cluster attributes/usr/sbin/vgchange -c cluster [-S sharable] vg_name RemarksMC/ServiceGuard cluster operations require the installation of the optional MC/ServiceGuard software, which is not included in the standard HP-UX operating system. Mirrored disk operations require the installation of the optional HP MirrorDisk/UX software, which is not included in the standard HP-UX operating system. DESCRIPTIONThe vgchange command with the -a option activates or deactivates one or more volume groups. For volume groups that are used in a high availability cluster, when the -a option is specified together with the -x option, the vgchange command allows cross-activation, changing the activation mode of an active sharable volume group directly to the specified activation mode, without first having to deactivate the volume group. The vgchange command with the -c specifies whether the indicated volume group(s) can be used in a high availability cluster, optionally the -S option can also be specified to configure whether the volume group is sharable (or is for exclusive activation only). The vgchange command without the -P resync_daemon_count option (default) will spawn one nomwcsyncd process for each volume group containing NOMWC logical volumes, and this can degrade system performance when many of these volume groups are activated at the same time. The -P resync_daemon_count option provides a way to control the number of concurrent nomwcsyncd processes spawned. This parameter is advisory, LVM may use a different value internally as necessary. The -Q option allows quiescing an active volume group to facilitate creating a consistent disk snapshot copy of all the physical volumes in the volume group. Metadata on the physical volumes is brought current and remains unchanged until normal operation is resumed using the -R option (or when the optionally specified -t quiesce_time time has expired). Specifying -Q rw when quiescing the volume group quiesces application reads and writes to the volume group. This mode is suitable for most situations. Specifying -Q w when quiescing the volume group quiesces application writes to the volume group while allowing reads to proceed as usual. This mode provides improved access to the data when used with applications that are capable of quiescing updates while allowing queries. See the Quiesced Volume Groups section for a more complete description of quiesced volume groups. vg_name must be defined as a volume group in the file /etc/lvmtab. If vg_name is omitted, all volume groups defined in /etc/lvmtab are affected, except when the -c -x -Q or -R options are specified. Only a single volume group can be provided with these options. High Availability Cluster OverviewVolume groups can be defined on disk volumes that are accessible by more than one system in a high availability cluster. This situation has a high potential for data corruption unless higher level cluster software services are used to coordinate shared access to the same volume group by all systems. A volume group can be marked as part of a cluster. When such a group is activated in exclusive mode, it can be accessed for exclusive read-write activity by only one of the systems at a time; the other systems can have read-only access to the data. When the volume group is also marked as sharable, it may be activated in shared mode for read-write access by all the nodes in the cluster. The configuration of a shared volume group can be changed only if it is activated in exclusive mode. Cross-activation between shared and exclusive modes of shared volume groups is possible with the -x option to vgchange. Simultaneously quiescing a volume group on all the systems sharing the volume group can be accomplished by invoking vgchange with the -Q option from any node in the cluster. A ServiceGuard cluster-lock volume group cannot be quiesced, because initializing or updating the cluster-lock requires writing to the disk. Options and Argumentsvgchange recognizes the following options and arguments:
Mirrored Disk ActivationWhen the optional HP MirrorDisk/UX software is running and a volume group is activated, LVM performs the necessary mirror consistency recovery for each logical volume in the volume group based on the state of Mirror Write Cache and Mirror Consistency Recovery (see the Consistency Recovery section of lvdisplay(1M)). In a non-shared environment, LVM supports MWC, NOMWC and the NONE recovery. But in shared environment, LVM only supports NOMWC and the NONE recovery.
Once mirror consistency is recovered using the configured policy, the mirrors are resynchronized (any stale extents made current) by copying data from a non-stale copy to the stale mirror copies. If the -s option is specified on the command line, mirror synchronization does not occur. However, for those logical volumes that have Mirror Write Cache turned off, mirror synchronization is done independently of whether the -s option appears on the command line. General ActivationIf vgchange cannot access a physical volume, it lists the volume's status as missing. If too many physical volumes in the volume group are missing, vgchange reports that the group does not have a quorum and cannot be activated. The lack of a quorum can be overridden with the -q n option. Quiesced Volume GroupsA quiesced volume group presents a stable and consistent disk image suitable for creating snapshot copies of the disks in the volume group. Quiesced volume groups have the following characteristics:
EXTERNAL INFLUENCESEnvironment VariablesLANG 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)). EXAMPLESActivate volume group /dev/vg03: vgchange -a y /dev/vg03 Deactivate volume group /dev/vg03: vgchange -a n /dev/vg03 Activate volume group /dev/vg03 without synchronizing extents that are not current on logical volumes that have Mirror Write Cache turned on: vgchange -a y -s /dev/vg03 Exclusive ActivationSet up volume group /dev/vg03 for use in a high availability cluster: vgchange -a n /dev/vg03 # Deactivate volume group vgchange -c y /dev/vg03 # Enable volume group for HA cluster vgchange -c y -S y /dev/vg03 # Enable volume group for HA cluster and mark as sharable vgchange -a e /dev/vg03 # Activate volume group in exclusive mode vgchange -a s /dev/vg03 # Activate volume group in shared mode Activate all volume groups; activate those that are marked for membership in a high availability cluster in shared mode: vgchange -a y Activate all volumes that are marked for membership in a high availability cluster in exclusive mode: vgchange -a e Cross ActivationSet up volume group /dev/sh_vg for use in a high availability cluster. To make configuration changes, to a volume group activated in shared mode, deactivate the volume group by executing the following command on each cluster node except one: vgchange -a n sh_vg On the single node, where the volume group is active:
Quiescing a Volume GroupQuiesce LVM metadata writes and application reads and writes to volume group /dev/vg03: vgchange -Q rw /dev/vg03 Quiesce LVM metadata and application writes but allow application reads to volume group /dev/vg03: vgchange -Q w /dev/vg03 Resume normal reads and writes to volume group /dev/vg03 (after having quiesced them earlier) : vgchange -R /dev/vg03 Quiesce volume group /dev/vg03 quiescing both reads and writes and automatically resume normal read/write access in 600 seconds: vgchange -Q rw -t 600 /dev/vg03 WARNINGSOrdinary OperationIn ordinary operation (that is, without the optional high availability software), it is possible to activate a volume group for read-write access from more than one physically connected system, leading to a high potential for data corruption. Therefore, if access is desired from more than one system to a single volume group, it is important that only one system activate the volume group for read-write access; the other systems can use read-only access. There is no problem if all systems activate the volume group for read-only access. Furthermore, volume group information is only read from the disks during volume group activation. Dynamic changes to the volume group such as the following are not propagated to other systems sharing the volume group:
Because of these limitations, when sharing volume groups between systems it is recommended that logical volumes be accessed only by one system at a time. If logical volumes must be accessed simultaneously, the logical volumes should not be mirrored and should not have bad-block relocation turned on, or all systems should use read-only access to the logical volumes. SEE ALSOmount(1M), vgcreate(1M), vgdisplay(1M), vgextend(1M), vgreduce(1M). If MC/ServiceGuard is installed: cmcheckconf(1M), cmquerycl(1M), and Managing MC/ServiceGuard. |
Printable version | ||
|