SLVM SingleNode Online Volume Re-Configuration/ J
SLVM SingleNode Online Volume Re-Configuration/ J
Abstract ........................................................................................................................................ 2
Overview ...................................................................................................................................... 2
Commands.................................................................................................................................... 4
vgchange(1M)............................................................................................................................ 4
Changing the mode to exclusive from shared .............................................................................. 4
Changing the mode to shared from exclusive .............................................................................. 4
Procedures .................................................................................................................................... 5
Making a configuration change in an active shared volume group ...................................................... 5
Determining whether SLVM SNOR is available on the system ................................................................. 8
SLVM SNOR Messages ................................................................................................................... 9
vgchange(1M)............................................................................................................................ 9
Required software and patch list...................................................................................................... 11
Abstract
The SLVM Single Node Online volume Re-configuration (SNOR) feature allows
changing the configuration of an active shared volume group in a cluster.
Using new options in LVM commands, SLVM SNOR allows the system administrator
to change the configuration of a shared volume group, and of logical and physical
volumes in that volume group, while keeping it active in a single node. Using this
procedure, applications on at least one node will be available during the volume group
re-configuration.
This document will first provide an overview of the SNOR operation, detail the
command changes, and describe the step-by-step procedure and the possible error
messages.
Overview
Prior to SLVM SNOR consider a ServiceGuard cluster set up on three nodes. Data is
shared in the cluster using common storage. SLVM is used to create and manage
volume groups shared across all nodes of the cluster. Applications access the volume
group for data read/write operations from disk. To change a shared VG configuration,
like creation or modification of logical volumes/physical volumes or a modification in
the volume group (VG) attributes, pre-SNOR it is required to:
With the SNOR online volume re-configuration functionality in place, the configuration
changes to the VG can be achieved without having to bring down the applications that
access the VG. A new command line option to the vgchange command (-x) is
introduced, which in conjunction with the -a option, allows a single node to switch an
active shared VG between shared and exclusive modes.
With the SNOR functionality installed, to change the VG configuration, it is required
that:
1. Applications using the VG are scaled down to one node. These applications are
still running on that one node
2. The VG is deactivated on all but one node of the cluster.
3. The activation mode of the VG is changed to exclusive in a single node.
4. Change the configuration on the VG.
5. If required, generate the map file with the changed configuration, copy it over
and re-import it to all the other nodes of the cluster.
6. Activate the VG in shared mode on the single node and then on all the other
cluster nodes.
On the cluster node where the VG stays active, user I/Os will be uninterrupted during
and after the activation mode changes from shared to exclusive and back to shared.
On the other cluster nodes where the VG is deactivated, the application must be scaled
down to the single cluster node, causing a loss of redundancy and possibly performance
degradation for that period.
Commands
vgchange(1M)
A new option (-x) was added to the vgchange command to change the activation mode
of a shared volume group.
vgchange -a e -x vg_name
The vgchange command provides a new "-x" option that must be used together with the
existing "-a e" option to change the activation mode of a shared VG to exclusive mode.
Upon success, the VG will be in the same state than if it had been activated in exclusive
mode from inactive.
The operation will fail if the volume group is activated on any other node than the local
node or if current operations on the volume group do not allow an activation change, e.g.
loss of runtime quorum (more than 50% of the last active set of physical volumes lost).
vgchange -a s -x vg_name
The vgchange command provides a new "-x" option that must be used together with the
existing "-a s" option to change the activation mode of an active VG from exclusive to
shared mode. Upon success, the VG will be in the same state than if it had been
activated in shared mode from inactive.
The operation will fail if the volume group is currently inactive or activated in shared
mode on the local node, or if current operations on the volume group do not allow an
activation change, e.g. loss of runtime quorum.
Procedures
Making a configuration change in an active shared volume group
1. Identify the shared volume group on which a configuration change is required. Call
it vg_shared.
2. Identify one node of the cluster which is running an application (say SGeRAC)
using the shared volume group. Call it node1. The applications using the volume
group, vg_shared, on this node will remain unaffected during the procedure. The
cluster application, SGeRAC, needs to be scaled down to the single cluster node
node1.
3. Deactivate the volume group on all other nodes of the cluster, except node1, using
the "-n" option to the vgchange command.
vgchange -a n vg_shared
Ensure the volume group, vg_shared, is now active only on a single cluster node,
node1 by using the vgdisplay command on all cluster nodes. The "Status" should
show available on a single node only.
vgchange -a e -x vg_shared
Note: Ensure that none of the mirrored logical volumes in this volume group have
Consistency Recovery set to MWC (refer to lvdisplay(1M)). Changing the
activation mode back to shared will not be allowed in that case, since Mirror Write
Cache consistency recovery (MWC) is not valid in volume groups activated in
shared mode.
On node1, run the required command to change the configuration. For example,
lvextend -m 2 /dev/vg_shared/lvol1
Warning: If one of the above commands was used to change the configuration of the
VG, and the mapfile, reflecting the change of configuration, is not imported on all
the other nodes, then unexpected errors could occur. For example, errors would be
reported if:
a) A vgchange tries to reattach PVs which were removed using vgreduce.
b) A logical volume which was reduced via lvreduce is opened.
6.2 Copy this mapfile /tmp/vg_shared to all the other nodes of the cluster.
6.3 On the other cluster nodes, export vg_shared and re-import it using the new map
file.
ls -l /dev/vg_shared/group
vgexport vg_shared
mkdir /dev/vg_shared
7. Change the activation mode back to shared in all the cluster nodes
On node1, change the mode back to shared
vgchange -a s -x vg_shared
vgchange -a s vg_shared
vgcfgbackup vg_shared
Determining whether SLVM SNOR is available on the
system
SLVM SNOR is available in patch form for HP-UX 11i v1 and v2 and as standard in future
HP-UX releases. Patches for LVM commands and kernel components, and the supported
ServiceGuard version need to be installed on the system to enable the feature. It will not be
available if patches for any of the three components are missing on the system.
1. Usage: vgchange
{-a Availability -q Quorum [-l] [-p] [-s] [VolumeGroupName... ]}
{[-S shareable] -c cluster VolumeGroupName}
{[-P parallel_nomwc_resync_count]}
"x": Illegal option.
This error is reported when the "-x" option to vgchange is used on a system that does
not have the SNOR LVM Commands patch.
Install the appropriate LVM command patch (see the Required software and patch
list).
2. Activation of volume group "/dev/vg_shared" denied by another node in the cluster. Request
on this system conflicts with Activation Mode on remote system.
This error is reported when the "-x" option to vgchange is used on a system that does
not have the SNOR ServiceGuard component installed.
Install the ServiceGuard patch as specified in the Required software and patch list.
3. The HP-UX kernel running on this system does not provide this feature.
This error is reported when the "-x" option to vgchange is used on a system that does
not have SLVM SNOR (LVM kernel component) installed.
Install the appropriate LVM kernel patch (see the Required software and patch list).
4. Activation mode of volume group "vg_shared" cannot be changed at this time. Please try
later.
This error is reported when the "-x" option to vgchange is used on a volume group
which has either lost quorum, or is undergoing server recovery or sparing activity.
5. Provide names of active volume group(s) for which reactivation in a different mode is
required.
This error is reported when the "-x" option to vgchange is used without specifying
the volume group name.
This error is reported when the "-x" option to vgchange is used on a volume group
which is already active in the requested mode.
7. To change activation mode, use lvchange(1M) to disable the Mirror Write
Cache flag for all Logical Volumes in "vg_shared".
This error is reported when the "-x" option to vgchange is used, with mirrored
logical volumes which have mirror consistency enabled but do not have the Mirror
Write Cache flag off, and the requested activation mode is shared (refer
lvchange(1M)). The Mirror Write Cache is never used when a volume group is
activated shared.
This error is reported when the "-x" option to vgchange is used on a volume group
which is not currently active.
9. Activation mode requested for the volume group "/dev/vg_shared" conflicts with configured
mode.
This error is reported when the "-x" option to vgchange is used on a volume group
which is not configured in shared mode.
Required software and patch list