HP-UX Reference (11i v3 07/02) - 1M System Administration Commands N-Z (vol 4)

v
vgscan(1M) vgscan(1M)
mv /etc/lvmtab /etc/lvmtab.BCK
vgscan -B
5. Recreate the
/etc/lvmtab file for activated volume groups, using the DSFs that were used to
activate them. For deactivated volume groups, no entries are added to
/etc/lvmtab , and no physical
volume DSFs are reported.
mv /etc/lvmtab /etc/lvmtab.BCK
vgscan -k
6. For the volume group
/dev/vg01, overwrite the existing physical volume DSFs in /etc/lvmtab
with the physical volume persistent DSFs found belonging to
/dev/vg01 during a hardware probing of
all devices.
vgscan -N -f /dev/vg01
7. For the volume group
/dev/vg01, overwrite the existing physical volume DSFs in /etc/lvmtab
with the physical volume DSFs used in kernel memory. The volume group
/dev/vg01 must be
activated, or this command will fail.
vgscan -k -f /dev/vg01
8. Recreate the /etc/lvmtab file with the volume groups
/dev/vg00, /dev/vg01, and
/dev/vg02. The volume group entries will be added to /etc/lvmtab in that order. For deac-
tivated volume groups, use legacy DSFs, and for activated volume groups, use the DSFs that were used
to activate them. Do not add any other volume groups.
mv /etc/lvmtab /etc/lvmtab.BCK
vgscan -f /dev/vg00 /dev/vg01 /dev/vg02
To preview the vgscan output for any of the above examples, include the -p
and -v options in the com-
mand lines.
WARNINGS
The
-N option may become obsolete in future releases.
The -B option may become obsolete in future releases.
For deactivated volume groups, vgscan cannot recover volume groups that do not have a unique Volume
Group ID, that is, when two or more volume groups share the same ID. If this scenario occurs, the
vgchgid command must be used to assign a unique Volume Group ID for each volume group. See
vgchgid(1M).
After running vgscan the number and order of physical volumes in the reconstructed
/etc/lvmtab file
could be different than what was configured previously (even if the
-f
option is used). The results could be
as follows:
The designated primary and alternate paths may not be the same as was configured before.
Alternate paths will be added to the
/etc/lvmtab file even though they weren’t initially configured
in the volume group.
The boot information may be incorrect, due to changed order of device special files in the new
/etc/lvmtab file.
Rectify the above problems as follows:
Run vgchange -a [y|e] to activate all deactivated volume groups. For shared volume groups,
invoke vgchange -x -a e to activate the shared volume group in exclusive mode.
Invoke vgreduce to remove any unwanted alternate paths which were added to the
/etc/lvmtab file as a result of the vgscan invocation.
For boot volume groups only, invoke lvlnboot -R to correct the boot information on the physical
volumes.
If the original primary path of a physical volume is now configured as an alternate, the order can be
reversed by using vgreduce to remove the primary path and then invoking vgextend to add it
back.
The vgscan command will also print the following warning messages to notify the user of the above prob-
lems:
HP-UX 11i Version 3: February 2007 3 Hewlett-Packard Company 651