Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > V

vgimport(1M)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

vgimport — import an LVM volume group onto the system

SYNOPSIS

/usr/sbin/vgimport [-m mapfile] [-p] [-v] vg_name pv_path ...

/usr/sbin/vgimport [-m mapfile] [-p] [-v] [-f infile] vg_name

/usr/sbin/vgimport -m mapfile [-N] [-v] [-p] -s vg_name

DESCRIPTION

The vgimport command adds the specified volume group to the system. The physical volumes, specified as pv_path ..., are scanned to obtain the volume group information and logical volume information. This command works much like vgcreate by requiring that the volume group device directory and the group special file be created before the command is executed (see vgcreate(1M)). The vg_name is added to the /etc/lvmtab file, and the associated logical volume device files are added to the system.

vgimport assumes that the volume group information has already been created on the physical volumes.

This command is useful in conjunction with the vgexport command (see vgexport(1M)), to move volume groups from one system to other systems within a high availability cluster.

vgimport creates logical volume device files under the vg_name directory using the naming convention given in mapfile or using the default naming convention used by the lvcreate command (see lvcreate(1M)).

The vgimport command reconstructs the newly imported volume group entry in the /etc/lvmtab file. The order of the disks belonging to the newly imported volume group could be different than it was before.

When a bootable volume group is imported, the boot information present in the boot disks might be incorrect due to the change in the order of disks in the /etc/lvmtab file. This is because the boot information on the boot disks assumes a certain order of disks in /etc/lvmtab and requires a resynchronization of this information after the first activation of a newly imported bootable volume group. To resynchronize the information on the boot disk after the first activation of a newly imported bootable volume group, run the lvlnboot command in recovery mode (-R option).

vgimport does not activate the imported volume group due to the many possible options at volume group activation time. To activate the volume group once it has been successfully imported, use the vgchange command (see vgchange(1M)).

Options and Arguments

vgimport recognizes the following options and arguments:

pv_path

The block device path names of a physical volume. This argument is not used with the -s and related options.

vg_name

The path name of the volume group.

-m mapfile

Specify the name of the file from which logical volume names and numbers are to be read. This option is optional when used as in the first command line format of the SYNOPSIS. If this option is not specified, logical volume names are created using the default naming convention lvolnn where nn is the logical volume minor number. When used with the -s option, the volume group specified in the mapfile can be shared among the exporting system and the importing systems.

-N

Configure the volume group by populating persistent device special files in the /etc/lvmtab file, corresponding to the volume group, vg_name. (See intro(7) for information about device special files.) This option can only be used with -s option. If vgimport is invoked without a -N option, legacy device special files will be used to populate the /etc/lvmtab file.

This option may become obsolete in future releases.

-s

Scan option. Scan each of the disks connected to the system and update the /etc/lvmtab file with the physical volumes that have matching volume group information, as found in the mapfile. This option should always be used in conjunction with the -m option. The specified mapfile is the file generated by running the vgexport command, also with -m and -s options.

-p

Preview the actions to be taken but do not update the /etc/lvmtab file or add the logical volume device files. This option is best used in conjunction with the -v option.

-v

Print verbose messages including names of the logical volumes.

-f infile

Import the set of pv_paths held in the infile into the volume group. This option is used as an alternative to specifying the pv_paths on the command line. Each pv_path must appear on a new line in the infile. This option may not be used together with the -s option.

WARNINGS

The -N option may become obsolete in future releases.

No more than eight paths to any physical volume will be added to the /etc/lvmtab file. All other paths wll be omitted.

The following warnings apply to the -s option, when importing disks with alternate paths:

The vgimport command does not preserve the path ordering, when a volume group is exported and then imported. This may cause the primary and alternate paths to be different on an importing system, from that of an exported system. Also, additional alternate paths that were not configured on the exported system may get discovered and configured on the importing system.

If the original primary path of a disk gets configured as an alternate path after the volume group is imported, the order can easily be reverted by using vgreduce to remove the primary path and then reconfiguring the same path again as an alternate, using vgextend.

If additional alternate paths were added to the newly imported volume group, use vgreduce to reduce any alternate paths that were added but not required.

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

Import the volume group /dev/vg01 that is located on physical disks /dev/dsk/c0t1d0 and /dev/dsk/c0t3d0:

vgimport -v /dev/vg01 /dev/dsk/c0t1d0 /dev/dsk/c0t3d0

Activate the volume group following a successful import:

vgchange -a y vg01

Import the volume group /dev/vg01 using the mapfile, /tmp/vg01.mymap. mymap was previously specified by the vgexport command on another system. The volume group, /dev/vg01, is specified in mymap and will be used by the importing system only:

vgimport -v -m /tmp/vg01.mymap /dev/vg01 \ /dev/dsk/c0t5d0 /dev/dsk/c0t7d0

Import the volume group /dev/vg02 using the mapfile, /tmp/vg02.mymap. mymap was previously specified by the vgexport command on another system. The volume group, /dev/vg02, is specified in mymap and will be shared among the exporting system, this system, and other systems importing the volume group as shared:

vgimport -v -s -m /tmp/vg02.mymap /dev/vg02

Import the volume group /dev/vg02 using the infile, /tmp/vg02.infile. infile was previously specified by the vgexport command on another system, and it assumes that pv_paths in the /tmp/vg02.infile are identical on both systems.

vgimport -v -f /tmp/vg02.infile /dev/vg02

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.