HP-UX Reference (11i v1 00/12) - 1M System Administration Commands N-Z (vol 4)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1m/naaagt.1m
________________________________________________________________
___ ___
v
vgscan(1M) vgscan(1M)
NAME
vgscan - scan physical volumes for LVM volume groups
SYNOPSIS
/usr/sbin/vgscan [-a][-p][-v]
DESCRIPTION
The vgscan command allows the re-creation of the /etc/lvmtab file and possibly the associated
volume group device files. This command should be run only in the event of a catastrophic error such as
the deletion of the /etc/lvmtab file or the mismatch of names of the physical volumes in the
/etc/lvmtab file to the actual physical volume path configuration. If the /etc/lvmtab file exists, the
information contained in the file is used to assist in rebuilding the file, but the existing file is updated with
the new corrected configuration.
vgscan searches each physical volume connected to the system, looking for logical volumes. If there are
dual controller devices, only the primary controller device path is scanned, unless you specify the -a option
to allow access to all paths. It groups these physical volumes into volume groups by matching the volume
group information found on the physical volumes. Then it searches the /dev directory for all group dev-
ice files with the LVM major number, and tries to match device files with the logical volumes’ information
found on the physical volumes.
If matches occur, it determines the volume group name from the device file path, and updates the
/etc/lvmtab file with the volume group name and the list of physical volumes paths contained in that
volume group. For volume groups where the device files cannot be matched, it prints the list of physical
volumes for each volume group.
After vgscan completes successfully, run the
vgimport command on each set of unmatched physical
volumes (see vgimport(1M)).
Options
vgscan recognizes the following options:
-a Scan all controller device paths for all disks.
-p Preview the actions that would be taken but do not update file
/etc/lvmtab . This option is
best used in conjunction with the
-v option.
-v Print verbose messages.
WARNINGS
The following warning only applies to dual controller devices (NIKE), or disks with alternate path:
Since vgscan search each disks on the system in the order of where they have configured. When
vgscan reconstructs the /etc/lvmtab file, the order of disks in the file could be different than it was
before. The following will happen:
The designated primary and alternate link might not be the same as it was configured before.
Alternate links will be added to the /etc/lvmtab file even if they might not be configured in the
volume group initially.
The boot information might be incorrect due to different order of disks in the new
/etc/lvmtab
file.
In order to correct the above problems, do the following:
Use vgchange with -a option to activate all volume groups.
Use lvlnboot with -R option to correct boot information on disk.
Use vgreduce to reduce any alternate links that were added to the /etc/lvmtab file by
vgscan, but they were not needed.
If the original primary path of a disks become an alternate path after /etc/lvmtab file is recon-
structed, the order can be easily reverted by using vgreduce to remove the primary path and use
vgextend to add the path back again.
If /etc/lvmtab is destroyed, do not use vgscan to re-construct /etc/lvmtab if the system is
heavily loaded by an application. Otherwise, vgscan will create an incomplete /etc/lvmtab due to a
known NIKE/LVM limitation issue. It’s important to quiesce the logical volume’s I/O before re-constructing
HP-UX Release 11i: December 2000 − 1 − Section 1M−−1033
___
___