HP-UX 11i v3 Using LVM Logical Volume Snapshots (September 2010)

8
(for example, 512 KB), more unshare units are required to represent the data in one extent. If the
unshare unit is large (for example, 4 MB), the number of unshare units required is less. The increase
in metadata size from Version 2.1 to Version 2.2 volume groups (with the same volume group
capacity) depends on the size of the unshare unit. You must choose this value carefully based on the
size and the pattern of I/Os issued by the application using the volume group. LVM recommends you
use the following guidelines when choosing the size of unshare unit:
If the write I/Os to the original logical volume or the snapshots are random and as small as one of
the unshare units, choose the unshare unit to which the typical I/O size is closest. If the write I/O is
larger than the largest unshare unit, choose the largest unshare unit. This applies to both raw and
block write I/Os.
If the write I/Os to the original logical volume or the snapshots are sequential, choose an unshare
unit such that the total size of the group of sequential I/Os is closest to the unshare unit. This applies
to both raw and block write I/Os.
If the application is read intensive (if the number of read I/Os are significantly more than the
number of write I/Os to the original logical volume or the snapshots) and the read I/Os are
random, choose an unshare unit that is closest to the size of the read I/O. This applies to both raw
and block read I/Os.
If the application is read intensive (if the number of read I/Os are significantly more than the
number of write I/Os to the original logical volume or the snapshots) and the read I/Os are
sequential in nature, consider the following:
For raw read I/Os, choose an unshare unit that is closest to the size of the read I/O.
For block read I/Os, choose the largest unshare unit (for example, 4096 K).
For more information, see vgcreate(1M).
Creating snapshots
To create a snapshot of a logical volume, use the lvcreate –S option. By default, the name of the
snapshot is a string consisting of the original logical volume name, the tag _S, and the minor number
of the snapshot logical volume. The snapshot logical volume is treated as just another logical volume
in the volume group and contributes to the limit of maximum number of logical volumes in a volume
group. The maximum number of snapshots you can create for a particular logical volume is 255.
By default, a snapshot is created as a read-only logical volume. You cannot create a snapshot when
the volume group is quiesced.
The following rules apply to all snapshot logical volumes:
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 original logical volume is configured for contiguous allocation.
After the snapshot is created, you cannot change its configuration parameters, except for the access
permissions, availability, IO timeout, and consistency recovery attributes.
You can stripe the snapshot only if the original logical volume is striped. You cannot create a
striped snapshot of a non-striped original logical volume, or vice versa.
The scheduling policy is inherited from the original logical volume and cannot be changed.
You cannot create snapshots off swap and dump logical volumes.
You can create only fully-allocated snapshots off root and boot logical volumes. You cannot create
space-efficient snapshot of these logical volumes.
You cannot create a snapshot of a snapshot logical volume.
You cannot create a snapshot of a logical volume whose size is 0.