vgscan.1m (2010 09)
v
vgscan(1M) vgscan(1M)
mv /etc/lvmtab /etc/lvmtab.BCK
or
mv /etc/lvmtab_p /etc/lvmtab_p.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 or
/etc/lvmtab_p
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 or /etc/lvmtab_p
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 or /etc/lvmtab_p 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 or /etc/lvmtab_p 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
problems:
*** LVMTAB has been created successfully.
*** Do the following to resync information on disk.
*** #1. vgchange -a y
*** #2. lvlnboot -R
No more than 8 paths to any Physical Volume will be added to the /etc/lvmtab or /etc/lvmtab_p
file. All other paths will be omitted.
SEE ALSO
lvlnboot(1M), vgchange(1M), vgcreate(1M), vgextend(1M), vgexport(1M), vgimport(1M), vgreduce(1M),
intro(7), lvm(7).
4 Hewlett-Packard Company − 4 − HP-UX 11i Version 3: September 2010