unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Page:
Section:
Apropos / Subsearch:
optional field



 vgcreate(1M)							vgcreate(1M)




 NAME
      vgcreate - create LVM volume group

 SYNOPSIS
      /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
      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 which must
      contain a character special file named group.  Except for the group
      entry, the directory vg_name 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
      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.  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, the
			       second becomes an alternate link to the
			       physical volume.	 The primary link is the
			       default path used to access the 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).





 Hewlett-Packard Company	    - 1 -   HP-UX Release 11i: November 2000






 vgcreate(1M)							vgcreate(1M)




	   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.

	   -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.




 Hewlett-Packard Company	    - 2 -   HP-UX Release 11i: November 2000






 vgcreate(1M)							vgcreate(1M)




			       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.

				    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.



 Hewlett-Packard Company	    - 3 -   HP-UX Release 11i: November 2000






 vgcreate(1M)							vgcreate(1M)




 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
      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

	   Using the PVLinks feature to create a volume group named
	   /dev/vg00 with a physical volume which 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.




 Hewlett-Packard Company	    - 4 -   HP-UX Release 11i: November 2000






 vgcreate(1M)							vgcreate(1M)




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

 SEE ALSO
      pvcreate(1M), vgchange(1M), vgdisplay(1M), vgextend(1M), vgreduce(1M),
      lvm(7).

















































 Hewlett-Packard Company	    - 5 -   HP-UX Release 11i: November 2000