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

3
LVM needs to set aside for copying over data from the original logical volume in future. These extents
are referred to as pre-allocated extents. When some data is unshared on a space-efficient snapshot,
an extent that satisfies the allocation policy of the snapshot is picked from the pool of pre-allocated
extents and data from the original logical volume is copied over to this extent. The success of a
space-efficient snapshot lies in provisioning for the right number of pre-allocated extents. For more
information, see
Creating snapshots
Snapshot uses
You typically use snapshots for the following:
Backup
Because a snapshot is created almost instantaneously, you can use it to create multiple point-in-time
images of the logical volume without having to disrupt the applications using the logical volumes.
You mount the snapshot image on a backup server and use it as a normal volume for backup
purposes. This greatly reduces the application downtime required to back up the volumes.
Restore
If the original logical volume image is corrupted, you can use its snapshot to restore the original
logical volume back to an image represented by the snapshot. Although LVM currently does not
support instant restore, you can manually copy the snapshot contents to the original logical volume.
Data mining
You can run data mining applications on the snapshot without affecting the performance of the
original logical volume.
Testing of applications
You can create a snapshot of the production data and test prototype applications on the snapshot.
If the snapshot is corrupted during testing, you can delete and recreate it for further testing.
Difference between snapshot logical volumes and split logical volumes
Prior to the HP-UX 11iv3 March 2010 update release, LVM supported an equivalent of snapshot
capability using the lvsplit and lvmerge commands. The differences between using the snapshot
feature over using lvsplit and lvmerge commands are as follows:
You can split only mirrored logical volumes to create a snapshot image of a logical volume. For
snapshots, the original logical volume need not be mirrored.
When a logical volume is split, the number of mirror copies associated with the original logical
volume is reduced by one, reducing the level of redundancy. For snapshots, the mirror copies
associated with the original logical volume and its snapshot are independent of each other, and
can be specified during creation.
A split logical volume is fully allocated and does not share any data with the original logical
volume. Snapshots, at the point of creation, share all their data with the original logical volume.
You can achieve space efficiency by creating space-efficient snapshots.
For split logical volumes, there is some control over the physical extents to be involved. For
space-efficient snapshots, you cannot choose the physical extents to be used on demand for
data unsharing.
There is very little performance degradation for writes to split logical volumes. However, there is
some performance degradation associated with the first write that causes copying of data over from
the original logical volume to the snapshot logical volume.