LVM Migration from Legacy to Agile Naming Model

Identify all legacy DSFs configured in the volume group, using vgdisplay –v. Ignore alternate links.
For each legacy DSF found, find its corresponding persistent DSF, using ioscan –m dsf <legacy_dsf>. If
the persistent DSF is already part of the volume group configuration, continue for this particular DSF, with
the step 2 - “Reduce the volume group of all legacy DSFs”.
If a physical volume is configured with 8 paths
1
(alternate links), remove one using vgreduce. This makes
room for the additional persistent DSF.
Extend the volume group to add the persistent DSF, keeping it in the same physical volume group (PVG)
configuration, if any (/etc/lvmpvg file gets automatically updated).
2. Reduce the volume group of all legacy DSFs:
Identify all legacy DSFs configured in the volume group, using vgdisplay –v.
For each of the legacy DSF that also has a corresponding persistent DSF configured, reduce the legacy
DSF from the volume group. If the corresponding persistent DSF is not configured in the volume group, a
message is displayed on screen and the command continues with other DSFs.
3. Back up the resulting configuration:
Back up the volume group configuration, using vgcfgbackup command.
Migration Procedure
Explained below are the steps to be performed for migration (using the vgdsf script).
1. Activate all configured volume groups in the system and identify the ones requiring a migration, using
vgchange –a y
2. For reference, make a note of the volume group configuration. Save the outputs of LVM display commands –
vgdisplay, pvdisplay and lvdisplay, invoked in verbose mode.
3. Ensure all physical volumes configured in the volume group are online using ioscan –P health command.
4. Run /usr/contrib/bin/vgdsf –c <vg_name> to migrate each volume group. Ensure that no failures are
reported.
5. Verify the resulting volume group configuration using LVM display commands. Use ioscan –m dsf
<dsf_name> command to validate the DSF mappings.
Note: vgdsf script must be invoked on all configured volume groups in the system and can easily be automated.
Given below is a sample script.
#!/usr/bin/ksh
#
# This script converts legacy DSFs to persistent DSFs in
# all active volume groups.
#
VGS=`/usr/sbin/vgdisplay -F | grep vg_name | cut -d: -f1 | cut -d= -f2`
for VG in $VGS
do
if vgdisplay -F $VG |grep -q "vg_status=available"; then
/usr/contrib/bin/vgdsf -c $VG
1
LVM supports a maximum of 8 paths to a physical volume.
10