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

v
vgscan(1M) vgscan(1M)
(1) Update incorrect, existing entries for activated volume groups. For example, a volume group
may have been imported with only a partial set of devices. Or, a boot volume group may have
been activated with persistent DSFs, while the existing entry in
/etc/lvmtab has legacy
DSFs.
(2) Migrate a deactivated volume group using legacy DSFs to use persistent DSFs, or vice-versa.
(3) Add volume group entries to the
/etc/lvmtab file in the order specified on the command
line. For example, this option can be used to put the boot volume group first in the
/etc/lvmtab file.
With the -f option, vgscan will not search for additional volume groups and will not report
unconfigured volume groups.
-k Skip the disk probe portion of
vgscan, and retrieve volume group information only from LVM
data structures in kernel memory. The disk probe portion can be a time consuming operation, so
this option can be used for faster recovery of
/etc/lvmtab . However, with this option, only
volume groups currently activated are added to
/etc/lvmtab
. For deactivated volume
groups, no information is added to
/etc/lvmtab
. The -k option cannot be used in conjunc-
tion with the
-a, -B, and -N options.
-N Populate /etc/lvmtab using persistent DSFs, with the following exception:
If there are volume groups activated that are using legacy DSFs, then
vgscan will populate
/etc/lvmtab using legacy DSFs for those physical volumes.
The -N option cannot be used in conjunction with the -a, -k, and
-B options.
-p Preview the actions that would be taken but do not update
/etc/lvmtab . This option is best
used in conjunction with the
-v option. As with other options, if the legacy naming model has
been disabled with the rmsf -L command (see rmsf(1M)), the -N option should also be used
with the -p option.
-v Print verbose messages.
EXTERNAL INFLUENCES
Environment Variables
LANG determines the language in which messages are displayed.
If LANG is not specified or is null, it defaults to "C" (see lang(5)).
If any internationalization variable contains an invalid setting, all internationalization variables default to
"C" (see environ(5)).
EXAMPLES
1. Append entries for volume groups missing from the
/etc/lvmtab file. For deactivated volume
groups, use legacy DSFs, and for activated volume groups, use the DSFs that were used to activate
them. Report all physical volume legacy DSFs belonging to unconfigured volume groups. Do not modify
existing volume group entries in
/etc/lvmtab . Run vgscan without any options:
vgscan
2. Recreate the /etc/lvmtab file for volume groups activated since the last boot. For deactivated
volume groups, use legacy DSFs, and for activated volume groups, use the DSFs that were used to
activate them. Report all physical volume legacy DSFs belonging to unconfigured volume groups.
mv /etc/lvmtab /etc/lvmtab.BCK
vgscan
3. Recreate the /etc/lvmtab file for volume groups activated since the last boot. For deactivated
volume groups, use persistent DSFs, and for activated volume groups, use the DSFs that were used to
activate them. Report all physical volume persistent DSFs belonging to unconfigured volume groups.
mv /etc/lvmtab /etc/lvmtab.BCK
vgscan -N
4. Recreate the /etc/lvmtab file for volume groups activated since the last boot. For activated and
deactivated volume groups, use both persistent and legacy DSFs. Report all physical volume persistent
and legacy DSFs belonging to unconfigured volume groups.
650 Hewlett-Packard Company 2 HP-UX 11i Version 3: February 2007