lvcreate.1m (2010 09)

l
lvcreate(1M) lvcreate(1M)
A snapshot defaults to non-mirrored even if the original logical volume is mirrored, unless mirroring
is explicitly configured during the snapshot creation.
When mirrored, a snapshot defaults to inherit the original logical volume’s MCR/MWC configuration,
unless MCR/MWC is explicately configured during snapshot configuration.
Once created, the configuration of a snapshot cannot be changed except for the access permission,
volume availability, volume IO timeout, and MCR/MWC attributes.
If you omit the
-l and
-L options, then the snapshot created will be a fully-allocated snapshot, which
will have just as many allocated logical extents as the original logical volume. The
-l or -L options can
be used to create a space-efficient snapshot by specifying the pre-allocated logical extents that will be
presented to the snapshot. The pre-allocated size of a space-efficient snapshot can vary between 1 and
the size of the original logical volume. The pre-allocated size of a space-efficient snapshot can be
increased but can not be decreased. See lvextend (1M) for details.
The
-n option can be used to specify the name of the snapshot. If this option is not used, then the name
of the snapshot will default to the string comprising of the original logical volume name, the tag
S, and
the snapshot volume minor number N , where N is the decimal equivalent of the least significant 12 bits of
the snapshot volume’s minor number. The range for N is 1 to 2047 (see lvm(7)).
The
-t option can be used to append the timestamp to the snapshot volume name. The timestamp is of
the form: YYYYMMDD_HH.MM.SS. The default is to not append a timestamp to the name of the
snapshot.
Since the HP-UX system operates in Coordiated Universal Time (UTC), the timestamp value used in the
snapshot volume name and the timestamp field of
lvdisplay (see lvdisplay (1M)) is based on your TZ
environment variable (see environ (5) and tztab (4)).
Note the following for timestamp value:
If the timestamp is requested to be appended to the name of the snapshot volume, then the time used
for timestamp will be according to the TZ environment variable when the snapshot logical volume was
created. The snapshot volume name will never get changed, even if the TZ is changed after the
snapshot has been created.
The value of timestamp field in the
lvdisplay output for the snapshot will be according to the TZ
environment variable when lvdisplay is issued.
time(), gmtime(), and ctime() are used for generating the time for the timestamp value.
strptime() and strftime() are used for formatting the time. See time (2), gmtime(3C),
ctime (3C), strptime (3C), and strftime (3C).
Note the following for space efficient snapshots:
For a space efficient snapshots, when the number of extents in the pre-allocated extent pool falls below
a certain threshold, a message is logged in the system’s
syslog, and an event is published to the
listening subsystems. If the automatic increase of pre-allocated extents is enabled, then number of
pre-allocated extents gets automatically incremented by the threshold value. Note that
lvmpud dae-
mon must be running for this to succeed.
If the automatic increase of pre-allocated extents is not enabled but the threshold value is set and
when the number of extents in the pre-allocated extent pool falls below the threshold value which is
set, a message is logged in the system’s
syslog, and an event is published to the listening subsys-
tems.
If neither
-e or -P options are specified, then by default, automatic increase of pre-allocated extents
is enabled, and the threshold value is set to the default value. Please refer to lvm(7) for more details.
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, used to create a logical volume in the
specified volume group.
original_lv The path name of the logical volume whose snapshot is to be created.
Only applicable with the
-S option to create snapshop logical volumes.
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010