HP-UX 11i v3 Using LVM Logical Volume Snapshots (September 2010)
9
You can use the following options when creating a snapshot:
• The –S option takes only one value s to indicate that the logical volume being created is a
snapshot logical volume.
• To create a fully-allocated snapshot, do not use the –l or –L options.
• To create a space-efficient snapshot, use the -l option to specify the number of extents in the
pre-allocated pool or the -L option to specify the size of pre-allocated pool.
• Use the –m option to create a mirrored snapshot. If you do not specify the -m option, the snapshot
is created with no mirrors, even if the original logical volume is mirrored. It is possible to create a
mirrored snapshot of a non-mirrored original logical volume.
• Use the –n option to explicitly set the name of the snapshot logical volume.
• Use the -t option to append a timestamp of the snapshot creation to the snapshot logical volume
name. The timestamp is of the form YYYYMMDD_HH.MM.SS.
• Use the -p option to set the access permission at the time of snapshot creation. Because the
snapshot is read-only by default, use this option to create a read-write snapshot logical volume
if required.
• Use the –e option (HP-UX 11i v3 September 2010 release and later) to enable or disable the
automatic increase of pre-allocated extents. By default, the automatic
increase of pre-allocated extents is
enabled. The lvmpud daemon must be running for this feature to be enabled. If not, it is disabled.
• Use the –P option (HP-UX 11i v3 September 2010 release and later) to set the threshold value at
which increment messages are logged in syslog or at which the automatic increase of pre-allocated
extents is triggered.
• You can use all other options, for example -c. -C, -D, -M, and –s, as for a normal logical volume.
Examples
• To create a read-only mirrored space-efficient snapshot of the logical volume /dev/vg01/lvol1
with default naming and 200 pre-allocated extents, enter the following command:
#lvcreate -S s -l 200 -m 1 /dev/vg01/lvol1
Logical volume "/dev/vg01/lvol1_S2" has been successfully created with
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 read-only space-efficient snapshot of the logical volume /dev/vg01/lvol1 with
default naming and 200 pre-allocated extents, threshold value set to 50%, and the automatic
increase of pre-allocated extents enabled without lvmpud running, enter the following command:
#lvcreate -S s -l 200 –e y –P 50 /dev/vg01/lvol1
The automatic increase of pre-allocated extents has been disabled
since lvmpud is not running. Please start the lvmpud daemon and
enable the feature using lvchange command
Logical volume "/dev/vg01/lvol1_S2" has been successfully created wit
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 read-only space-efficient snapshot of the logical volume /dev/vg01/lvol1 with
default naming and 200 pre-allocated extents, threshold value set to 30%, and the automatic
increase of pre-allocated extents enabled with lvmpud running, enter the following command:
#lvcreate -S s -l 200 –e y –P 30 /dev/vg01/lvol1
Logical volume "/dev/vg01/lvol1_S2" has been successfully created with