*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> vgcreate (1m)              
Title
Content
Arch
Section
 

Contents


 vgcreate(1M)                                                   vgcreate(1M)




 NAME    [Toc]    [Back]
      vgcreate - create LVM volume group

 SYNOPSIS    [Toc]    [Back]
      /usr/sbin/vgcreate [-f] [-A autobackup] [-x extensibility] [-e max_pe]
           [-l max_lv] [-p max_pv] [-s pe_size] [-g pvg_name] vg_name
           pv_path ...

 DESCRIPTION    [Toc]    [Back]
      The vgcreate command creates a new volume group.  vg_name is a
      symbolic name for the volume group and must be used in all references
      to it.  vg_name is the path to a directory entry under /dev that must
      contain a character special file named group.  Except for the group
      entry, the vg_name directory should be empty.  The vg_name directory
      and the group file have to be created by the user (see lvm(7)).

      vgcreate leaves the volume group in an active state.

      Before assigning a physical volume to a volume group, the physical
      volume has to be created using the pvcreate command (see
      pvcreate(1M)).

      If vgcreate fails to install the first specified physical volume into
      the volume group, the volume group is not created.  If, for any
      reason, one of the remaining specified physical volumes cannot be
      installed into the volume group, an error message is printed, but the
      installation continues until the end of the list of physical volumes.

    Options and Arguments    [Toc]    [Back]
      vgcreate recognizes the following options and arguments:

           pv_path             The block device path name of a physical
                               volume that will be assigned to the new
                               volume group.  On PA-RISC systems, pv_path
                               should be the path name for the whole disk.
                               For Itanium(R)-based system boot physical
                               volumes, pv_path should be the path name for
                               the disk section containing the HP-UX
                               partition.  For Itanium-based system non-boot
                               physical volumes, pv_path can be the path
                               name for the whole disk or the disk section
                               containing the HP-UX partition.  You can
                               specify physical volume links pv-links for a
                               physical volume providing different paths
                               that reference the same physical volume in
                               the pv_path list.  The order in which the
                               paths are listed is important.  The first
                               path becomes the primary link to the physical
                               volume, and the second becomes an alternate
                               link to the physical volume.  The primary
                               link is the default path used to access the



 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003






 vgcreate(1M)                                                   vgcreate(1M)




                               physical volume.  If the primary link becomes
                               unavailable, LVM automatically switches to
                               the alternate link to access the physical
                               volume.  Currently, LVM supports a maximum of
                               8 paths to a physical volume (7 alternate and
                               one primary).

           vg_name             The path name of a subdirectory of the /dev
                               directory.  vg_name must be empty except for
                               a character special file named group.
                               Typically, this directory name is in the form
                               /dev/vgNN, where NN numbers sequentially from
                               00.

           -A autobackup       Set automatic backup for this invocation of
                               this command.  autobackup can have one of the
                               following values:

                                    y    Automatically back up configuration
                                         changes made to the volume group.
                                         This is the default.

                                         After this command executes, the
                                         vgcfgbackup command (see
                                         vgcfgbackup(1M)) is executed for
                                         the volume group.

                                    n    Do not back up configuration
                                         changes this time.

           -e max_pe           Set the maximum number of physical extents
                               that can be allocated from any of the
                               physical volumes in the volume group.  The
                               default value for max_pe is 1016.  However,
                               if the size of any physical volume exceeds
                               1016 times the pe_size, the default value for
                               max_pe is adjusted to match the physical
                               volume size.  The maximum number of physical
                               extents can be a value in the range 1 to
                               65535.

           -f                  This option will force a volume group to be
                               created with a physical volume which has
                               alternate block(s) already allocated, (i.e.
                               this physical volume was not initialized
                               using pvcreate -f.) This option should be
                               used with extreme caution.  If the volume
                               group to be created has a different physical
                               extent size, the alternate block(s) might be
                               inside the user data area.  Potential data
                               corruption could occur.



 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003






 vgcreate(1M)                                                   vgcreate(1M)




           -g pvg_name         Create a new physical volume group with the
                               name pvg_name.  All physical volumes
                               specified in the pv_path parameter become a
                               member of the newly created physical volume
                               group.

                               The physical volume group information is
                               stored in an ASCII file, /etc/lvmpvg.  The
                               file can be edited to create a physical
                               volume group instead of using the vgcreate
                               command.  However, ensure that the physical
                               volumes to be used have already been
                               installed in the volume group prior to
                               creating the physical volume group.

                               The physical volume group name must be unique
                               within a volume group although identical
                               physical volume group names can appear in
                               different volume groups (see lvmpvg(4) for
                               format details).

           -l max_lv           Set the maximum number of logical volumes
                               that the volume group is allowed to contain.
                               The default value for max_lv is 255.  The
                               maximum number of logical volumes can be a
                               value in the range 1 to 255.

           -p max_pv           Set the maximum number of physical volumes
                               that the volume group is allowed to contain.
                               The default value for max_pv is 16.  The
                               maximum number of physical volumes can be a
                               value in the range 1 to 255.

           -s pe_size          Sets the number of megabytes in each physical
                               extent, where pe_size is expressed in units
                               of megabytes (MB) in the range 1 to 256.
                               pe_size must be equal to a power of 2 (1, 2,
                               4, 8, etc.).  The default value for pe_size
                               is 4 (four megabytes).

           -x extensibility    Set the allocation permission for adding
                               physical extents on the physical volumes
                               specified by the pv_path parameter.
                               extensibility can have one of the following
                               values:

                                    y    Allow allocation of additional
                                         physical extents on the physical
                                         volume.  This is the default.





 Hewlett-Packard Company            - 3 -   HP-UX 11i Version 2: August 2003






 vgcreate(1M)                                                   vgcreate(1M)




                                    n    Prohibit allocation of additional
                                         physical extents on the physical
                                         volume.  Logical volumes residing
                                         on the physical volume can still be
                                         accessed after the volume group has
                                         been activated by the vgchange -a y
                                         command.

 EXTERNAL INFLUENCES    [Toc]    [Back]
    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    [Toc]    [Back]
      Create a volume group named /dev/vg00 containing two physical volumes
      with extent size set to 2 MB, from scratch.

           First, create the directory /dev/vg00 with the character special
           file called group.

                mkdir /dev/vg00
                mknod /dev/vg00/group c 64 0x030000

           The minor number for the group file should be unique among all
           the volume groups on the system.  It has the format 0xNN0000,
           where NN runs from 00 to ff.  The maximum value of NN is
           controlled by the kernel tunable parameter maxvgs.

           Initialize the disks using pvcreate(1M).

                pvcreate /dev/rdsk/c1t0d0
                pvcreate /dev/rdsk/c1t2d0

           Create the volume group.

                vgcreate -s 2 /dev/vg00 /dev/dsk/c1t0d0 /dev/dsk/c1t2d0

           Create a volume group named /dev/vg01 that can contain a maximum
           of three logical volumes, with extent size set to 8 MB:

                vgcreate -l 3 -s 8 /dev/vg01 /dev/dsk/c3t4d0

           Create a volume group named /dev/vg00 and a physical volume group
           named PVG0 with two physical volumes:

                vgcreate -g PVG0 /dev/vg00 /dev/dsk/c1t0d0 /dev/dsk/c2t0d0




 Hewlett-Packard Company            - 4 -   HP-UX 11i Version 2: August 2003






 vgcreate(1M)                                                   vgcreate(1M)




           Using the PVLinks feature to create a volume group named
           /dev/vg00 with a physical volume that can be referenced by two
           different paths.  /dev/dsk/c3t0d0 and /dev/dsk/c4t0d0 refer to
           the same physical volume, accessed via different controller
           hardware paths.  In this example, /dev/dsk/c3t0d0 becomes the
           primary link to the physical volume.  /dev/dsk/c4t0d0 becomes an
           alternate link to the physical volume.

                vgcreate /dev/vg00 /dev/dsk/c3t0d0 /dev/dsk/c4t0d0

 SEE ALSO    [Toc]    [Back]
      idisk(1M), pvcreate(1M), vgchange(1M), vgdisplay(1M), vgextend(1M),
      vgreduce(1M), lvm(7).


 Hewlett-Packard Company            - 5 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
pvcreate HP-UX create physical volume for use in LVM volume group
lvcreate HP-UX create logical volume in LVM volume group
vgcfgbackup HP-UX create or update LVM volume group configuration backup file
dgcfgbackup HP-UX create or update VxVM volume group configuration backup file
pvchange HP-UX change characteristics and access path of physical volume in LVM volume group
pvck HP-UX check or repair a physical volume in LVM volume group
vgrestore HP-UX restore a VxVM disk group back to an LVM volume group
vgchange HP-UX set LVM volume group availability
vgimport HP-UX import an LVM volume group onto the system
vxvmboot HP-UX prepare VERITAS Volume Manager volume as a root, boot, primary swap or dump volume
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service