lvcreate.1m (2010 09)

l
lvcreate(1M) lvcreate(1M)
NAME
lvcreate - create a new logical volume or snapshot volume in LVM volume group
SYNOPSIS
Creating a Logical Volume
/usr/sbin/lvcreate
[-A autobackup ][-c mirror_consistency][
-C contiguous ][-d schedule ]
[
-D distributed ][-i stripes [
-I stripe_size ]] [-l le_number -L lv_size ][-m mirror_copies]
[
-M mirror_write_cache][
-n lv_name ][
-p permission ][-r relocate ][-s strict ] vg_name
Creating a Snapshot Volume on Volume Group Version 2.2 or Higher
/usr/sbin/lvcreate -S
snap_type [-A autobackup ][
-c mirror_consistency][
-C contiguous ]
[
-D distributed ][-e auto_prealloc_enabled][
-l prealloc_le_number |
-L prealloc_le_size][
-m
mirror_copies ][-M mirror_write_cache][
-n snap_lv_name ][-p permission ][-P
threshold_value][
-s strict ][-t timestamp ]
original_lv
Remarks
Mirrored disk operations require the installation of the optional HP MirrorDisk/UX software, which is not
included in the standard HP-UX operating system.
DESCRIPTION
The
lvcreate command can be used in two ways. The first form creates a new logical volume within
the volume group specified by vg_name. The second form, used with the -S
option, creates a snapshot
volume off an existing logical volume; see Creating Snapshot Volumes below.
The total number of logical volumes that can be created depends on the version of the volume group. Use
the
lvmadm command to find the maximum number of logical volumes for each volume group version.
See lvm(7) for more information.
If you specify the
-n lv_name option, a new logical volume is created with that given name. Otherwise, a
system-generated name of the form
lvolN is created. For a logical volume created within a volume
group version 1.0, N is the decimal equivalent of the two least significant bytes of the minor number of
the new logical volume and the range for N is 1 to 255. For a logical volume created within a volume
group version 2.0, N is the decimal equivalent of the least significant 12 bits of the logical volumes minor
number, and the range for N is 1 to 511. For a logical volume created within a volume group version 2.1
and 2.2, N is the decimal equivalent of the least significant 12 bits of the logical volumes minor number,
and the range for N is 1 to 2047 (see lvm (7)).
Two device files are created in vg_name : a block device file named lv_name or
lvolN, and a character
(raw) device file named
rlv_name or rlvolN.
If you omit the
-l and -L options, the logical volume is created with zero length. This permits you to
choose its physical volume location when you allocate logical extents with the lvextend command (see
lvextend (1M)). If you specify -l or -L, the location is determined automatically.
The default settings provide the most commonly used characteristics. Use the options to tailor the logical
volume to the requirements of the system. Once a logical volume is created, some of its characteristics
can be changed with the
lvchange, lvextend, and lvreduce commands (see lvchange (1M),
lvextend (1M), and lvreduce (1M)).
Creating Snapshot Volumes
The second form of
lvcreate uses the -S option to create a snapshot volume of an existing logical
volume within a volume group. Snapshots can be of two types: fully-allocated and space-efficient. See
lvm(7) for more information about snapshots.
The snapshot volume is created as just another logical volume in the volume group. The following condi-
tions apply to the creation of snapshot volumes:
It is necessary to provide an original logical volume.
The allocation policies of the snapshot are inherited from the original logical volume unless specified
explicitly, with the exception that contiguous allocation policy is not supported for space-efficient
snapshots. The allocation policy of a space-efficient snapshot is set to default allocation when the ori-
ginal logical volume is configured for contiguous allocation.
The snapshot is striped only if the original logical volume is striped. Specifying the stripe size or
stripe width for snapshots is not supported.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (10 pages)