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

v
vgscan(1M) vgscan(1M)
NAME
vgscan - scan physical volumes for LVM volume groups
SYNOPSIS
/usr/sbin/vgscan
[-p][-v][
-a -B -k -N][-f vg_names...]
DESCRIPTION
The
vgscan command is used as follows:
1. Recovering and recreating the
/etc/lvmtab file when the file has been deleted or does not match the
current physical volumes.
2. Reporting device special file lists for unconfigured volume groups.
For recovery,
vgscan will add entries for volume groups that are missing from
/etc/lvmtab . The
vgscan command recovers volume group information by using LVM data structures in kernel memory,
and by probing all devices, searching for LVM disks. If one or more physical volumes in the volume group
has more than 8 paths, the vgscan
command will only include 8 paths per physical volume. Additional
path(s) will not be added in the
/etc/lvmtab file. The volume group device special le
(
/dev/vg_name/group
) must be present for recovery to succeed. In addition, vgscan will recover a
missing volume group only if it has been activated at least once since the last boot, and the Volume Group
ID is unique (see the WARNINGS section).
Unconfigured volume groups are volume groups residing on attached storage that are missing from
/etc/lvmtab , and have not been activated since the last boot. The vgscan command cannot recover
the /etc/lvmtab entries for these volume groups. Instead, it will print out the physical volume device
special files for these volume groups. Configure these volume groups using the vgimport
command. See
vgimport(1M).
The
vgscan command will not update existing volume group entries in /etc/lvmtab unless the -f
option is used. The -f option can be used to overwrite existing volume group entries in
/etc/lvmtab .
Otherwise,
/etc/lvmtab should be moved before running vgscan, in order for the options to take full
effect.
In HP-UX 11i Version 3, the Mass Storage Stack supports two naming conventions for the device special
files used to identify devices (see intro(7) and lvm(7)). Devices are represented as follows:
Persistent device special files, (
/dev/disk/disk3).
Legacy device special files, (
/dev/dsk/c0t6d6
).
LVM supports the use of both conventions within the same volume group.
The
vgscan command provides several options for controlling the use of legacy and persistent DSFs (dev-
ice special files) during the /etc/lvmtab recovery. By default, vgscan will populate /etc/lvmtab
with legacy DSFs, including alternate paths. There is one exception:
For activated volume groups that are using persistent DSFs, vgscan will populate
/etc/lvmtab
using persistent DSFs for those physical volumes. The -N and -B
options allow the user to override
this default behavior.
Options and Arguments
vgscan recognizes the following options and arguments:
-a Scan all paths of multipathed physical volumes. The -a option cannot be used in conjunction
with the -k, -B, and -N options and when the legacy naming model is disabled with the rmsf
-L
command (see rmsf(1M)).
-B Populate /etc/lvmtab using both persistent and legacy DSFs. Persistent DSFs will be added
before legacy DSFs, so they will be used as the primary path. This option can be used to migrate
a deactivated volume group using legacy DSFs to use both persistent and legacy DSFs. The -B
option cannot be used in conjunction with the -a, -k, and -N options and when the legacy nam-
ing model is disabled with the rmsf -L command (see rmsf(1M)).
-f vg_names
For the specified volume groups, force vgscan to replace any existing entries in
/etc/lvmtab with updated entries. If the volume groups are missing from /etc/lvmtab ,
they are added. The -f option provides the following functions:
HP-UX 11i Version 3: February 2007 1 Hewlett-Packard Company 649