lvm.7 (2011 03)

l
lvm(7) lvm(7)
If a write requires an unshare operation to be performed on the snapshot, but there is no available
extent in the pre-allocated extent pool, then the snapshot gets marked as
over-committed
.
If an unshare operation fails on a snapshot, it gets marked as inoperative. All reads and writes on an
inoperative logical volume will fail.
Snapshots are by default read-only logical volumes, but the user can choose to create writable snapshots.
See lvcreate (1M) and lvchange (1M) for more information.
If a logical volume has snapshots associated with it, then there could be an increase in the latencies asso-
ciated with reads and writes on the original logical volume or its snapshots. The increased latency will
not be incurred after the first write on the unshare unit.
The following are differences between snapshot logical volumes and logical volumes that are a result of
lvsplit command:
The
lvsplit command can be used to atomically split multiple logical volumes, where as snapshots
can only be created one at a time.
When a logical volume is spilt, the number of mirror copies associated with the original logical volume
reduces by one. In the case of snapshots, the mirror copies associated with the original logical volume
and its snapshot are independent of each other, and can be specified during creation. See
lvcreate (1M).
The two logical volumes that are a result of a split operation can be considered as independent logical
volumes. Snapshots always are associated with the original logical volume. The original logical
volume has to be available for the snapshot to be available.
A split logical volume is fully allocated and does not share any data (on-disk) with the original logical
volume. Snapshots, at the point of creation, share all their data with the original logical volume.
Snapshots are read-only by default, where as a split logical volume is read-write.
Irrespective of the number of mirrors associated with it, a logical volume can have up to 255
snapshots, where as such a logical volume cannot be split.
In the case of split logical volumes, there is a certain degree of control over the physical extents that
will be involved, while in the case of space-efficient snapshots, one cannot choose the physical extents
that will be used on demand for data unsharing.
There is very little performance degradation for writes to split logical volumes, while there is a perfor-
mance degradation associated with logical volumes on a snapshot tree.
NOTE: As the size of the volume group and the size of the snapshot capacity in the volume group
increase, the size of the configuration backup file for the volume group also increases. Therefore, for
volume group version 2.0 and higher, the default location for backing up the volume group configuration
is configurable (from the default path of
/etc/lvmconf). See vgcfgbackup (1M) for more details.
EXAMPLES
The basic steps to take to begin using LVM are as follows:
Identify the disks to be used for LVM.
Create an LVM data structure on each identified disk (see pvcreate (1M)).
Collect all the physical volumes to form a new volume group (see vgcreate (1M)).
Create logical volumes from the space in the volume group (see lvcreate (1M)).
Use each logical volume as if it were a disk section (create a file system, or use for raw access).
To configure disk
/dev/dsk/c0t0d0 as part of a new volume groups version 1.0 named vg01:
First, initialize the disk for LVM with the
pvcreate command.
pvcreate /dev/rdsk/c0t0d0
Then, create the pseudo device file that is used by the LVM subsystem. The vg_name directory and
group file will be created automatically. Optionally, these files can be created before doing the
vgcreate, as follows:
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
HP-UX 11i Version 3: March 2011 5 Hewlett-Packard Company 5