HP-UX Reference (11i v1 05/09) - 1M System Administration Commands A-M (vol 3)
l
lvcreate(1M) lvcreate(1M)
NAME
lvcreate - create logical volume in LVM volume group
SYNOPSIS
/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
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.
lvcreate cannot be performed if the volume group is activated in shared mode.
Logical volumes that were created using the striped option are not supported in shared mode.
DESCRIPTION
The lvcreate command creates a new logical volume within the volume group specified by vg_name.Up
to 255 logical volumes can be created in one volume group.
If you specify the
-n lv_name option, a new logical volume is created with that name. Otherwise, a
system-generated name of the form
lvolN is created, where N is the decimal equivalent of the two least
significant bytes of the minor number of the new logical volume, in the range
1
to 255 (see lvm(7)). Two
device files are created in vg_name: a block device file named lv_name or
lvol
N, 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)).
Options and Arguments
The -c, -d, -m, -M, and -s options are only meaningful if the optional HP MirrorDisk/UX software has
been installed on the system.
lvcreate recognizes the following options and arguments:
vg_name The path name of a volume group.
-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 logical volume.
This is the default.
After this command executes, the vgcfgbackup command (see
vgcfgbackup(1M)) is executed for the volume group to which the logical
volume belongs.
n Do not back up configuration changes this time.
-c mirror_consistency
Set mirror consistency recovery. This option is effective only when -M n is
specified. It is ignored for -M y. mirror_consistency can have one of the following
values:
y Set mirror consistency recovery on. This is the default.
LVM achieves mirror consistency during volume group activation by going
through all logical extents and copying data from a nonstale copy to the other
mirror copies.
n Set mirror consistency recovery off. LVM does not perform mirror con-
sistency recovery on this logical volume when the volume group is activated.
Section 1M−−444 Hewlett-Packard Company − 1 − HP-UX 11i Version 1: September 2005