Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lvchange(1M)

lvextend(1M)

lvreduce(1M)

pvchange(1M)

lvcreate(1M)  —  Series 800 Only

NAME

lvcreate − create a logical volume in a volume group

SYNOPSIS

/etc/lvcreate [-d schedule] {-l logical_extents_number | -L logical_volume_size} [-m mirror_copies] [-n lv_path] [-p permission] [-r relocate] [-s strict] [-C contiguous] [-M mirror_write_cache] [-c vol_group_name

DESCRIPTION

lvcreate creates a new logical volume within the volume group specified by vol_group_name.

If lv_path is specifed on the command line, a new logical volume is created with that name.  If lv_path is not specified, a system-generated name of the form lvolN is created, where N is the minor number of the new logical volume starting with minor number 1. 

Default settings provide the most commonly used characteristics, but use options to tailor the logical volume to the requirements of the system.  Once a logical volume is created, its characteristics can be changed by using the lvchange, lvextend, and lvreduce commands (see lvchange(1M), lvextend(1M), and lvreduce(1M)).

−d schedule Set scheduling policy when one logical extent with more than one mirror is written.  schedule can have one of the following values:

p (default) Establish a parallel scheduling policy. 

s Establish a sequential scheduling policy.  This value should be used with care since, in most cases, it leads to performance loss. 

−l logical_extents_number
Allocate the number of logical extents specified by logical_extents_number to the lv_path. logical_extents_number is a numeric value ranging from 1 through 65535 (implemtation limit); default value is zero.  Either this option or the -L option can be specificed, but not both. 

-L logical_volume_size
Create a logical volume of size logical_volume_size, where logical_volume_size is specified in units of Mbytes.  The maximum value for logical_volume_size is 4096 Mbytes (4 Gbytes). 

Allocate the number of logical extents corresponding to the logical_volume_size. If the logical_volume_size is not a multiple of extent size, the size is adjusted to be the next multiple.  The number of logical extents can be a value ranging from 1 through 65535.

Either this option or the -l option can be specified, but not both. 

-m mirror_copies Set the number of physical extents (mirrors) allocated for each logical extent. 

mirror_copies specifies the number of mirror copies that contain the same data as the original; value can be 1 or 2, meaning, respectively, one or two mirror copies that contain the same data as the original.  Default value for mirror_copies is zero. 

This option requires installation of optional LVM MIRRORING software (not included in the standard HP-UX operating system) before it can be used. 

-n lv_path Create a new logical volume with the specified name lv_path where lv_path is a simple file name, not a path name. 

-p permission Set the access permission to read-write or read-only.  permission can have one of the following values:

w (default) Set access permission to read-write. 

r Set access permission to read-only. 

-r relocate Set bad block relocation policy.  relocate can have one of the following values:

y (default) Cause bad block relocation to occur. 

n Prevent bad block relocation from occurring. 

-s strict Define strict allocation policy.  Mirror copies of a logical extent can be allocated to share or not share the same physical volume (or physical volume group).  This option only makes sense when the physical volumes (of the volume group that owns the logical volume to be changed) reside on different physical disks.  strict can have one of the following values:

y (default) Set a strict allocation policy; mirrors for a logical extent cannot share the same physical volume. 

n Do not set a strict allocation policy; mirrors for a logical extent can share the same physical volume. 

g Set a PVG -strict allocation policy; mirrors for a logical extend cannot share the same physical volume group.  PVG -strict allocation policy cannot be set on a logical volume in a volume group that does not have any physical volume group defined. 

-C contiguous Defines the contiguous allocation policy.  A contiguous logical volume has three characteristics:

• Physical extents are allocated in ascending order,

• No gap is allowed between physical extents within a mirror copy,

• Physical extents of any mirror copy all reside in a single physical volume. 

Use the strict ( -s) and contiguous ( -C) options together to form various combined allocation policies on a logical volume.  For example, -s y -C y means to create a logical volume such that each mirror copy is contiguous, yet mirror copies of a logical extent cannot share the same physical volume. 

y Set a contiguous allocation policy. 

n (default) Do not set a contiguous allocation policy. 

-M mirror_write_cache
Set Mirror Write Cache to on or off. mirror_write_cache can have one of the following values:

y (default) Set Mirror Write Cache to on.  Every write to a mirror copy is recorded in the Mirror Write Cache and written to the Mirror Consistency Record under the Volume Group Reserved Area on the disk.  This allows the LVM to determine whether all the mirror copies are identical, even across system crashes.  When the volume group is activated, the Mirror Consistency Record is used to perform mirror consistency recovery. 

n Set Mirror Write Cache to off.  Mirror write does not incur an additional write to the Mirror Consistency Record. 

-c mirror_consistency
Set mirror consistency recovery to on or off. This option only makes sense when -M n is specified.  mirror_consistency can have one of the following values:

y (default) Set mirror consistency recovery to on.  LVM achieves mirror consistency during volume group activation by going through all logical extents and copying data from a non-stale copy to the other mirror copies. 

n Set mirror consistency recovery to off.  LVM does not perform mirror consistency recovery on this logical volume when the volume group is activated. 

EXTERNAL INFLUENCES

Environment Variables

LANG determines the language in which messages are displayed. 

If LANG is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG. 

If any internationalization variable contains an invalid setting, lvcreate behaves as if all internationalization variables are set to "C".  See environ(5).

EXAMPLES

Create a logical volume in volume group /dev/vg02:

lvcreate /dev/vg02

Create a logical volume in volume group /dev/vg03 with non-strict allocation policy:

lvcreate -s n /dev/vg03

Create a logical volume of size 100 Mbytes in volume group /dev/vg03:

lvcreate -L 100 /dev/vg03

REMARKS

The -m and -r options cannot be used with HP-IB devices. 

SEE ALSO

lvchange(1M), lvextend(1M), lvreduce(1M), pvchange(1M). 

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026