HP-UX 11i v3 Using LVM Logical Volume Snapshots (September 2010)
10
character device "/dev/vg01/rlvol1_S2".
Logical volume "/dev/vg01/lvol1_S2" has been successfully extended.
Volume Group configuration for /dev/vg01 has been saved in
/etc/lvmconf/vg01.conf
• To create a fully-allocated writeable snapshot of the logical volume /dev/vg01/lvol1, with the
name snap1 and the timestamp appended to this name, enter the following command:
#lvcreate -S s -n snap1 -t y –p w /dev/vg01/lvol1
Logical volume "/dev/vg01/snap1_20100122_00.36.18" has been successfully
created with character device "/dev/vg01/rsnap1_20100122_00.36.18".
Logical volume "/dev/vg01/snap1_20100122_00.36.18" has been successfully
extended.
Volume Group configuration for /dev/vg01 has been saved in
/etc/lvmconf/vg01.conf
Note
When a logical volume snapshot is created, the logical volume is first
quiesced. After all I/Os that are in progress have completed, the I/Os on
the logical volume are paused for the duration of the snapshot creation.
There is no guarantee that the status of the snapshot will be the same as
that of the original logical volume when the lvcreate command was
initiated to create the snapshot. To ensure correctness of the snapshot
logical volume, HP recommends that the applications using the logical
volume be quiesced prior to initiating the snapshot creation.
Choosing the size of the pre-allocated pool
The optimum size of pre-allocated pool depends on the purpose of the snapshot and the duration for
which the snapshot is kept. You must choose this value carefully based on the I/O activity on the
original logical volume.
If you intend to create a snapshot to retain for a long time, create a fully-allocated snapshot. This
ensures that the snapshot does not become over-committed due to writes on the original logical
volume over a period of time.
If the snapshot is taken for backup purposes and the backup is typically done when the I/O activity is
minimal, the size of pre-allocated pool must be slightly more than the total size of data written during
the backup activity. For example, if you determine that during the backup activity, maximum of 30%
of the logical volume can be written to, provision the pre-allocated pool to have slightly more than this
value to prevent the snapshot from becoming over-committed.
For more information, see lvcreate(1M).
Extending the pre-allocated extent pool
This section applies to space-efficient snapshots only. To increase the number of extents in the
pre-allocated pool, use the lvextend command. Use the -l option to specify the new value for the
number of extents in the pre-allocated pool or the -L option to specify the new total size of the
pre-allocated pool. The value specified with the -L option is rounded to the nearest multiple of the
logical extent size. In both the cases, the number of extents in the pre-allocated pool cannot exceed
the number of extents in the original logical volume.
You cannot specify physical volume paths or physical volume groups when increasing the number of
number of extents in the pre-allocated pool. The lvextend command can fail in the following cases:
• Not enough extents are available to satisfy the allocation policy of the space efficient snapshot
logical volume.